summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-09-25 22:52:03 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-09-25 22:52:26 -0700
commit26ead385a782934bbc5b2485bb9f3b71802e645c (patch)
tree48df4318bd1cfed69453d342b43f480e1ab228a6 /tests
parent402b967fa95bebbc4786ae755391f0c745717df6 (diff)
tests: Add more move tests
Add a test that checks that static buffer pointer was moved correctly by checking if offset_debug still works.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_document.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index fa0dc8d..3ca69cd 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -1726,4 +1726,13 @@ TEST(document_move_large)
CHECK(!other.first_child());
}
+
+TEST_XML(document_move_buffer, "<node1/><node2/>")
+{
+ CHECK(doc.child(STR("node2")).offset_debug() == 9);
+
+ xml_document other = std::move(doc);
+
+ CHECK(other.child(STR("node2")).offset_debug() == 9);
+}
#endif