summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-10-09 20:53:02 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-10-09 20:53:02 -0700
commit3e9cf53ea7c8dfa1d4d4f1e525dfea16120e3362 (patch)
tree47cf1a41c06d82f99162a93c4412196dbeecbb8a
parentbfc0f346b4612619f1c62871c785ea43748f70e9 (diff)
tests: Add a test for empty xpath_query ctor
-rw-r--r--tests/test_xpath_api.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_xpath_api.cpp b/tests/test_xpath_api.cpp
index bd008fb..e53c25a 100644
--- a/tests/test_xpath_api.cpp
+++ b/tests/test_xpath_api.cpp
@@ -409,6 +409,15 @@ TEST_XML(xpath_api_deprecated_select_single_node, "<node><head/><foo id='1'/><fo
CHECK(n2.node().attribute(STR("id")).as_int() == 1);
}
+TEST(xpath_api_empty)
+{
+ xml_node c;
+
+ xpath_query q;
+ CHECK(!q);
+ CHECK(!q.evaluate_boolean(c));
+}
+
#if __cplusplus >= 201103
TEST_XML(xpath_api_nodeset_move_ctor, "<node><foo/><foo/><bar/></node>")
{