summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xpath_api.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_xpath_api.cpp b/tests/test_xpath_api.cpp
index c1a4968..6b32b68 100644
--- a/tests/test_xpath_api.cpp
+++ b/tests/test_xpath_api.cpp
@@ -418,6 +418,13 @@ TEST(xpath_api_empty)
CHECK(!q.evaluate_boolean(c));
}
+TEST(xpath_api_query_out_of_memory)
+{
+ test_runner::_memory_fail_threshold = 1;
+
+ CHECK_ALLOC_FAIL(xpath_query q(STR("node")));
+}
+
#ifdef PUGIXML_HAS_MOVE
TEST_XML(xpath_api_nodeset_move_ctor, "<node><foo/><foo/><bar/></node>")
{