diff options
Diffstat (limited to 'tests/test_document.cpp')
-rw-r--r-- | tests/test_document.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp index 3ca69cd..4205949 100644 --- a/tests/test_document.cpp +++ b/tests/test_document.cpp @@ -1715,16 +1715,20 @@ TEST(document_move_large) { xml_document* doc = new xml_document(); + xml_node dn = doc->append_child(STR("node")); + for (int i = 0; i < 3000; ++i) - doc->append_child(STR("node")); + dn.append_child(STR("child")); xml_document other = std::move(*doc); delete doc; + xml_node on = other.child(STR("node")); + for (int i = 0; i < 3000; ++i) - CHECK(other.remove_child(other.first_child())); + CHECK(on.remove_child(on.first_child())); - CHECK(!other.first_child()); + CHECK(!on.first_child()); } TEST_XML(document_move_buffer, "<node1/><node2/>") |