summaryrefslogtreecommitdiff
path: root/tests/test_xpath_api.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine@gmail.com <arseny.kapoulkine@gmail.com@99668b35-9821-0410-8761-19e4c4f06640>2012-02-18 03:35:37 +0000
committerarseny.kapoulkine@gmail.com <arseny.kapoulkine@gmail.com@99668b35-9821-0410-8761-19e4c4f06640>2012-02-18 03:35:37 +0000
commit1835571886997c22170af8e74ad6201976b913ae (patch)
tree1d0928a2538d9ec7404dd53e3b1571379728c58e /tests/test_xpath_api.cpp
parent0d4020e96e58915e55a49222b3bdf1e04dfc5c5f (diff)
tests: Add an explicit test for empty xpath_node_set copying (regression test for issue 143)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@832 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_xpath_api.cpp')
-rw-r--r--tests/test_xpath_api.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_xpath_api.cpp b/tests/test_xpath_api.cpp
index b735f8c..d831712 100644
--- a/tests/test_xpath_api.cpp
+++ b/tests/test_xpath_api.cpp
@@ -130,6 +130,14 @@ TEST_XML(xpath_api_nodeset_copy, "<node><foo/><foo/></node>")
CHECK_STRING(copy4[0].node().name(), STR("foo"));
}
+TEST(xpath_api_nodeset_copy_empty)
+{
+ xpath_node_set set;
+ xpath_node_set set2 = set;
+ xpath_node_set set3;
+ set3 = set;
+}
+
TEST_XML(xpath_api_evaluate, "<node attr='3'/>")
{
xpath_query q(STR("node/@attr"));