diff options
Diffstat (limited to 'tests/test_document.cpp')
-rw-r--r-- | tests/test_document.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp index d6163e2..e424836 100644 --- a/tests/test_document.cpp +++ b/tests/test_document.cpp @@ -866,3 +866,13 @@ TEST(document_load_exceptions) CHECK(thrown); } #endif + +TEST_XML_FLAGS(document_element, "<?xml version='1.0'?><node><child/></node><!---->", parse_default | parse_declaration | parse_comments) +{ + CHECK(doc.document_element() == doc.child(STR("node"))); +} + +TEST_XML_FLAGS(document_element_absent, "<!---->", parse_comments) +{ + CHECK(doc.document_element() == xml_node()); +} |