summaryrefslogtreecommitdiff
path: root/examples/cppunittest/XmlOutputterTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cppunittest/XmlOutputterTest.cpp')
-rw-r--r--examples/cppunittest/XmlOutputterTest.cpp85
1 files changed, 0 insertions, 85 deletions
diff --git a/examples/cppunittest/XmlOutputterTest.cpp b/examples/cppunittest/XmlOutputterTest.cpp
index c15d4ff..e3149ae 100644
--- a/examples/cppunittest/XmlOutputterTest.cpp
+++ b/examples/cppunittest/XmlOutputterTest.cpp
@@ -39,91 +39,6 @@ XmlOutputterTest::tearDown()
void
-XmlOutputterTest::testEmptyNodeToString()
-{
- CppUnit::XmlOutputter::Node node( "element" );
- std::string expectedXml = "<element></element>";
- CPPUNITTEST_ASSERT_XML_EQUAL( expectedXml, node.toString() );
-}
-
-
-void
-XmlOutputterTest::testNodeWithAttributesToString()
-{
- CppUnit::XmlOutputter::Node node( "element" );
- node.addAttribute( "id", 17 );
- node.addAttribute( "date-format", "iso-8901" );
- std::string expectedXml = "<element id=\"17\" "
- "date-format=\"iso-8901\">"
- "</element>";
- CPPUNITTEST_ASSERT_XML_EQUAL( expectedXml, node.toString() );
-}
-
-
-void
-XmlOutputterTest::testEscapedAttributeValueToString()
-{
- CppUnit::XmlOutputter::Node node( "element" );
- node.addAttribute( "escaped", "&<>\"'" );
- std::string expectedXml = "<element escaped=\""
- "&amp;&lt;&gt;&quot;&apos;"
- "\"></element>";
- CPPUNITTEST_ASSERT_XML_EQUAL( expectedXml, node.toString() );
-}
-
-
-void
-XmlOutputterTest::testNodeToStringEscapeContent()
-{
- CppUnit::XmlOutputter::Node node( "element", "ChessTest<class Chess>" );
- std::string expectedXml = "<element>"
- "ChessTest&lt;class Chess&gt;"
- "</element>";
- CPPUNITTEST_ASSERT_XML_EQUAL( expectedXml, node.toString() );
-}
-
-
-void
-XmlOutputterTest::testNodeWithChildrenToString()
-{
- CppUnit::XmlOutputter::Node node( "element" );
- node.addNode( new CppUnit::XmlOutputter::Node( "child1" ) );
- node.addNode( new CppUnit::XmlOutputter::Node( "child2" ) );
- std::string expectedXml = "<element><child1></child1>"
- "<child2></child2></element>";
- CPPUNITTEST_ASSERT_XML_EQUAL( expectedXml, node.toString() );
-}
-
-
-void
-XmlOutputterTest::testNodeWithContentToString()
-{
- CppUnit::XmlOutputter::Node node( "element", "content\nline2" );
- std::string expectedXml = "<element>content\nline2</element>";
- CPPUNITTEST_ASSERT_XML_EQUAL( expectedXml, node.toString() );
-}
-
-
-void
-XmlOutputterTest::testNodeWithNumericContentToString()
-{
- CppUnit::XmlOutputter::Node node( "element", 123456789 );
- std::string expectedXml = "<element>123456789</element>";
- CPPUNITTEST_ASSERT_XML_EQUAL( expectedXml, node.toString() );
-}
-
-
-void
-XmlOutputterTest::testNodeWithContentAndChildToString()
-{
- CppUnit::XmlOutputter::Node node( "element", "content" );
- node.addNode( new CppUnit::XmlOutputter::Node( "child1" ) );
- std::string expectedXml = "<element><child1></child1>content</element>";
- CPPUNITTEST_ASSERT_XML_EQUAL( expectedXml, node.toString() );
-}
-
-
-void
XmlOutputterTest::testWriteXmlResultWithNoTest()
{
CppUnit::OStringStream stream;