summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>")
{