summaryrefslogtreecommitdiff
path: root/src/cppunit/XmlOutputter.cpp
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2002-03-01 19:19:54 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2002-03-01 19:19:54 +0000
commit995dd0a5786e1c5d3a0a18d3107cded17cf32089 (patch)
treeb27204a238ac1ac44bc9e3194dc6426d25bb1287 /src/cppunit/XmlOutputter.cpp
parent2c7af6bda8b090a31dd39e3ca6e5c55ed7758fb9 (diff)
downloadcppunit-995dd0a5786e1c5d3a0a18d3107cded17cf32089.tar.gz
Inclued/cppunit/XmlOutputter.
inclued/cppunit/XmlOutputter.h: * inclued/cppunit/XmlOutputter.cpp: added optional parameter to constructor to specify the encoding. * configure.in: updated version number to 1.7.3
Diffstat (limited to 'src/cppunit/XmlOutputter.cpp')
-rw-r--r--src/cppunit/XmlOutputter.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/cppunit/XmlOutputter.cpp b/src/cppunit/XmlOutputter.cpp
index 540482d..52ed281 100644
--- a/src/cppunit/XmlOutputter.cpp
+++ b/src/cppunit/XmlOutputter.cpp
@@ -15,7 +15,7 @@ namespace CppUnit
XmlOutputter::Node::Node( std::string elementName,
- std::string content ) :
+ std::string content ) :
m_name( elementName ),
m_content( content )
{
@@ -23,7 +23,7 @@ XmlOutputter::Node::Node( std::string elementName,
XmlOutputter::Node::Node( std::string elementName,
- int numericContent ) :
+ int numericContent ) :
m_name( elementName )
{
m_content = asString( numericContent );
@@ -40,7 +40,7 @@ XmlOutputter::Node::~Node()
void
XmlOutputter::Node::addAttribute( std::string attributeName,
- std::string value )
+ std::string value )
{
m_attributes.push_back( Attribute( attributeName, value ) );
}
@@ -48,7 +48,7 @@ XmlOutputter::Node::addAttribute( std::string attributeName,
void
XmlOutputter::Node::addAttribute( std::string attributeName,
- int numericValue )
+ int numericValue )
{
addAttribute( attributeName, asString( numericValue ) );
}
@@ -152,9 +152,11 @@ XmlOutputter::Node::asString( int value )
// //////////////////////////////////////////////////////////////////
XmlOutputter::XmlOutputter( TestResultCollector *result,
- std::ostream &stream ) :
+ std::ostream &stream,
+ std::string encoding ) :
m_result( result ),
- m_stream( stream )
+ m_stream( stream ),
+ m_encoding( encoding )
{
}
@@ -176,7 +178,7 @@ void
XmlOutputter::writeProlog()
{
m_stream << "<?xml version=\"1.0\" "
- "encoding='ISO-8859-1' standalone='yes' ?>"
+ "encoding='" << m_encoding << "' standalone='yes' ?>"
<< std::endl;
}