From 0a96b552d647b4e77022901dcdc3fbc9d6ce10b1 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 31 Oct 2010 07:37:37 +0000 Subject: tests: Added document reset-self test git-svn-id: http://pugixml.googlecode.com/svn/trunk@787 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_document.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') 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, "") CHECK(doc.first_child().offset_debug() == -1); } + +TEST_XML(document_reset_copy_self, "") +{ + CHECK_NODE(doc, STR("")); + + doc.reset(doc); + + CHECK(!doc.first_child()); + CHECK_NODE(doc, STR("")); +} -- cgit v1.2.3