summaryrefslogtreecommitdiff
path: root/test/formats/osxml
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-18 21:29:36 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-18 21:29:36 +0100
commit5dfa2b6cba3e31d18e2cc23f05d330e387fc1a29 (patch)
tree2f97711bd12bfdb35425c0ffaca5af6a231b8076 /test/formats/osxml
parentf6d3495b681e19227a5ea9ec081d36644be55d68 (diff)
parent19e3e43e80e413d297ca8970d018eeda57ee65e1 (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'test/formats/osxml')
-rw-r--r--test/formats/osxml/OsxmlParserTest.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/test/formats/osxml/OsxmlParserTest.cpp b/test/formats/osxml/OsxmlParserTest.cpp
index 5cc0669..3bf4a47 100644
--- a/test/formats/osxml/OsxmlParserTest.cpp
+++ b/test/formats/osxml/OsxmlParserTest.cpp
@@ -66,15 +66,6 @@ TEST(OsxmlParser, mismatchedTag)
ASSERT_TRUE(logger.hasError());
}
-TEST(OsxmlParser, generic)
-{
- XmlStandaloneEnvironment env(logger);
- env.parse("generic.osxml", "", "", RttiSet{&RttiTypes::Node});
-#ifdef MANAGER_GRAPHVIZ_EXPORT
- env.manager.exportGraphviz("xmlDocument.dot");
-#endif
-}
-
static void checkAttributes(Handle<StructType> expected,
Handle<Descriptor> desc)
{
@@ -347,6 +338,7 @@ static void checkText(Handle<Node> p, Handle<Node> expectedParent,
TEST(OsxmlParser, documentParsing)
{
+ logger.reset();
XmlStandaloneEnvironment env(logger);
Rooted<Node> book_document_node =
env.parse("simple_book.osxml", "", "", RttiSet{&RttiTypes::Document});
@@ -391,5 +383,21 @@ 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());
+}
+
}