From 8afeb9d71acebb59411d3adaa46744569d8f40e7 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Mon, 10 May 2010 16:43:07 +0000 Subject: Added more tests git-svn-id: http://pugixml.googlecode.com/svn/trunk@406 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_deprecated.cpp | 10 ++++++++++ tests/test_dom_modify.cpp | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/tests/test_deprecated.cpp b/tests/test_deprecated.cpp index 8565f96..fe88f63 100644 --- a/tests/test_deprecated.cpp +++ b/tests/test_deprecated.cpp @@ -167,6 +167,7 @@ TEST_XML(dom_node_wildcard_star, "") CHECK(node.attribute_w(STR("*?*d*")).as_int() == 1); } +// parse_wnorm_attribute flag TEST(parse_attribute_wnorm) { xml_document doc; @@ -201,3 +202,12 @@ TEST(parse_attribute_variations_wnorm) } } +// document order +TEST_XML(document_order_coverage, "") +{ + xml_document doc; + doc.precompute_document_order(); + + CHECK(doc.child("node").document_order() == 0); + CHECK(doc.child("node").attribute("id").document_order() == 0); +} diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp index 8b869f4..780608f 100644 --- a/tests/test_dom_modify.cpp +++ b/tests/test_dom_modify.cpp @@ -403,6 +403,17 @@ TEST_XML(dom_node_remove_child, "")); } +TEST_XML(dom_node_remove_child_complex, "") +{ + doc.child(STR("node")).remove_child(STR("n1")); + + CHECK_NODE(doc, STR("")); + + doc.remove_child(STR("node")); + + CHECK_NODE(doc, STR("")); +} + TEST_XML(dom_node_append_copy, "foo") { CHECK(xml_node().append_copy(xml_node()) == xml_node()); -- cgit v1.2.3