diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-10-18 18:27:13 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-10-18 18:27:13 +0000 |
commit | d8c19b201f93dc070fb37472f933b53e49b393bc (patch) | |
tree | d03dea0fda328120612218413c8aa4526bb75734 /tests | |
parent | 498947c71897bfad865d37252df6689c1a78e1d8 (diff) |
Added xml_document::document_element function
git-svn-id: http://pugixml.googlecode.com/svn/trunk@768 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests')
-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()); +} |