diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-10-09 20:53:02 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2015-10-09 20:53:02 -0700 |
commit | 3e9cf53ea7c8dfa1d4d4f1e525dfea16120e3362 (patch) | |
tree | 47cf1a41c06d82f99162a93c4412196dbeecbb8a /tests/test_xpath_api.cpp | |
parent | bfc0f346b4612619f1c62871c785ea43748f70e9 (diff) |
tests: Add a test for empty xpath_query ctor
Diffstat (limited to 'tests/test_xpath_api.cpp')
-rw-r--r-- | tests/test_xpath_api.cpp | 9 |
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>") { |