From 7a6c99c0b09377bca0b77d2918cf1e2092b3f59c Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 8 Apr 2015 12:20:19 +0200 Subject: refactored the more sophisticated OSXML parser tests to the integration test folder. --- test/formats/osxml/OsxmlParserTest.cpp | 30 ------------------------------ test/plugins/html/DemoOutputTest.cpp | 27 --------------------------- 2 files changed, 57 deletions(-) (limited to 'test') diff --git a/test/formats/osxml/OsxmlParserTest.cpp b/test/formats/osxml/OsxmlParserTest.cpp index 03f10d3..603d6c1 100644 --- a/test/formats/osxml/OsxmlParserTest.cpp +++ b/test/formats/osxml/OsxmlParserTest.cpp @@ -384,35 +384,5 @@ TEST(OsxmlParser, documentParsing) } } - -TEST(OsxmlParser, complexDocumentParsing) -{ - logger.reset(); - XmlStandaloneEnvironment env(logger); - Rooted book_document_node = - env.parse("complex_book.osxml", "", "", RttiSet{&RttiTypes::Document}); - ASSERT_FALSE(logger.hasError()); - ASSERT_FALSE(book_document_node == nullptr); - ASSERT_TRUE(book_document_node->isa(&RttiTypes::Document)); - Rooted doc = book_document_node.cast(); - ASSERT_TRUE(doc->validate(logger)); - ASSERT_FALSE(logger.hasError()); -} - -TEST(OsxmlParser, simpleAnnotation) -{ - logger.reset(); - XmlStandaloneEnvironment env(logger); - Rooted book_document_node = - env.parse("simple_annotation.osxml", "", "", RttiSet{&RttiTypes::Document}); - ASSERT_FALSE(logger.hasError()); - ASSERT_FALSE(book_document_node == nullptr); - ASSERT_TRUE(book_document_node->isa(&RttiTypes::Document)); - Rooted doc = book_document_node.cast(); - ASSERT_TRUE(doc->validate(logger)); - ASSERT_FALSE(logger.hasError()); -} - - } diff --git a/test/plugins/html/DemoOutputTest.cpp b/test/plugins/html/DemoOutputTest.cpp index 1c54a14..f2d0a24 100644 --- a/test/plugins/html/DemoOutputTest.cpp +++ b/test/plugins/html/DemoOutputTest.cpp @@ -134,32 +134,5 @@ struct XmlStandaloneEnvironment : public StandaloneEnvironment { } }; -TEST(DemoHTMLTransformer, pipelineTest) -{ - // Construct Manager - TerminalLogger logger{std::cerr, true}; - XmlStandaloneEnvironment env(logger); - Rooted book_document_node = - env.parse("complex_book.osxml", "", "", RttiSet{&RttiTypes::Document}); - ASSERT_FALSE(logger.hasError()); - ASSERT_FALSE(book_document_node == nullptr); - ASSERT_TRUE(book_document_node->isa(&RttiTypes::Document)); - Rooted doc = book_document_node.cast(); - ASSERT_TRUE(doc->validate(logger)); - ASSERT_FALSE(logger.hasError()); - - // we can only do a rough check here. - DemoHTMLTransformer transformer; - std::stringstream out; - transformer.writeHTML(doc, out, logger); - const std::string res = out.str(); - ASSERT_FALSE(res == ""); - ASSERT_TRUE(res.find("Was ist Aufklärung?") != std::string::npos); - ASSERT_TRUE(res.find( - "Aufklärung ist der Ausgang des Menschen aus seiner " - "selbstverschuldeten Unmündigkeit") != std::string::npos); - ASSERT_TRUE(res.find("Sapere aude!") != std::string::npos); -} - } } -- cgit v1.2.3