summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-10-31 07:37:37 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-10-31 07:37:37 +0000
commit0a96b552d647b4e77022901dcdc3fbc9d6ce10b1 (patch)
tree7ff570f11df0a984c315dc8d923706d72d88c50c
parent4920e4fec93b801410b85c894c292a8e982661ba (diff)
tests: Added document reset-self test
git-svn-id: http://pugixml.googlecode.com/svn/trunk@787 99668b35-9821-0410-8761-19e4c4f06640
-rw-r--r--tests/test_document.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index 8796560..971bb48 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -925,3 +925,13 @@ TEST_XML(document_reset_copy, "<node><child/></node>")
CHECK(doc.first_child().offset_debug() == -1);
}
+
+TEST_XML(document_reset_copy_self, "<node><child/></node>")
+{
+ CHECK_NODE(doc, STR("<node><child /></node>"));
+
+ doc.reset(doc);
+
+ CHECK(!doc.first_child());
+ CHECK_NODE(doc, STR(""));
+}