diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-01-30 23:24:20 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-01-30 23:52:32 -0800 |
commit | a1bc15c8d525ff2cac165cc0e5d08b272d79fc33 (patch) | |
tree | a17977f8fc4b5f57ccfddcbc1e3aa2032074346c /tests/test_xpath_api.cpp | |
parent | f500435cb49c3b532cec562bb63470af0c9e6a31 (diff) |
tests: Add more coverage tests
Expand out of memory coverage during XPath parsing and evaluation and
add some other small tests.
Diffstat (limited to 'tests/test_xpath_api.cpp')
-rw-r--r-- | tests/test_xpath_api.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_xpath_api.cpp b/tests/test_xpath_api.cpp index 1e7f924..3f05e13 100644 --- a/tests/test_xpath_api.cpp +++ b/tests/test_xpath_api.cpp @@ -573,6 +573,18 @@ TEST(xpath_api_nodeset_move_assign_empty) CHECK(move.type() == xpath_node_set::type_sorted); } +TEST_XML(xpath_api_nodeset_move_assign_self, "<node><foo/><foo/><bar/></node>") +{ + xpath_node_set set = doc.select_nodes(STR("node/bar")); + + CHECK(set.size() == 1); + CHECK(set.type() == xpath_node_set::type_sorted); + + test_runner::_memory_fail_threshold = 1; + + set = std::move(*&set); +} + TEST(xpath_api_query_move) { xml_node c; |