From 447d29938e716f4ca33de5fecf20637196f50599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 4 Feb 2011 20:14:19 +0100 Subject: [PATCH] Fixed #2544 (XML output does not specify encoding used) --- lib/errorlogger.cpp | 2 +- test/testerrorlogger.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/errorlogger.cpp b/lib/errorlogger.cpp index 0bb9cbc98..387603d8f 100644 --- a/lib/errorlogger.cpp +++ b/lib/errorlogger.cpp @@ -150,7 +150,7 @@ std::string ErrorLogger::ErrorMessage::getXMLHeader(int xml_version) // standard xml header std::ostringstream ostr; - ostr << "\n"; + ostr << "\n"; // version 1 header if (xml_version <= 1) diff --git a/test/testerrorlogger.cpp b/test/testerrorlogger.cpp index e716602a5..9e4962e1d 100644 --- a/test/testerrorlogger.cpp +++ b/test/testerrorlogger.cpp @@ -125,7 +125,7 @@ private: std::list locs; locs.push_back(loc); ErrorMessage msg(locs, Severity::error, "Programming error.\nVerbose error", "errorId"); - ASSERT_EQUALS("\n", ErrorLogger::ErrorMessage::getXMLHeader(1)); + ASSERT_EQUALS("\n", ErrorLogger::ErrorMessage::getXMLHeader(1)); ASSERT_EQUALS("", ErrorLogger::ErrorMessage::getXMLFooter(1)); ASSERT_EQUALS("", msg.toXML(false,1)); } @@ -138,7 +138,7 @@ private: std::list locs; locs.push_back(loc); ErrorMessage msg(locs, Severity::error, "Programming error.\nVerbose error", "errorId"); - ASSERT_EQUALS("\n", ErrorLogger::ErrorMessage::getXMLHeader(1)); + ASSERT_EQUALS("\n", ErrorLogger::ErrorMessage::getXMLHeader(1)); ASSERT_EQUALS("", ErrorLogger::ErrorMessage::getXMLFooter(1)); ASSERT_EQUALS("", msg.toXML(true,1)); } @@ -151,7 +151,7 @@ private: std::list locs; locs.push_back(loc); ErrorMessage msg(locs, Severity::error, "Programming error.\nVerbose error", "errorId"); - std::string header("\n\n"); + std::string header("\n\n"); header += " \n ";