From 26ead385a782934bbc5b2485bb9f3b71802e645c Mon Sep 17 00:00:00 2001
From: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Date: Mon, 25 Sep 2017 22:52:03 -0700
Subject: tests: Add more move tests

Add a test that checks that static buffer pointer was moved correctly
by checking if offset_debug still works.
---
 tests/test_document.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'tests')

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
-- 
cgit v1.2.3