diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-04-08 12:20:19 +0200 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:19:33 +0200 |
commit | 7a6c99c0b09377bca0b77d2918cf1e2092b3f59c (patch) | |
tree | 582118cdb815c7d942c4b0ae9d94642e3ba01602 /test | |
parent | 003d5e57f6f4c8996dcd9cdd03b61004307fd180 (diff) |
refactored the more sophisticated OSXML parser tests to the integration test folder.
Diffstat (limited to 'test')
-rw-r--r-- | test/formats/osxml/OsxmlParserTest.cpp | 30 | ||||
-rw-r--r-- | test/plugins/html/DemoOutputTest.cpp | 27 |
2 files changed, 0 insertions, 57 deletions
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<Node> 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<Document> doc = book_document_node.cast<Document>(); - ASSERT_TRUE(doc->validate(logger)); - ASSERT_FALSE(logger.hasError()); -} - -TEST(OsxmlParser, simpleAnnotation) -{ - logger.reset(); - XmlStandaloneEnvironment env(logger); - Rooted<Node> 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<Document> doc = book_document_node.cast<Document>(); - 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<Node> 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<Document> doc = book_document_node.cast<Document>(); - 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); -} - } } |