From 60d5688a87b03aa85b74026c1fb79fd0ca8903d7 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 30 Jan 2017 22:27:48 -0800 Subject: tests: Make predicate out-of-memory test less aggressive Currently this test has very large runtime and relies on the fact that the first memory allocation error causes the test to terminate. This does not work with new behavior of running the query through and reporting the error at the end, so make the runtime reasonable but still generate enough memory to blow past the budget. --- tests/test_xpath.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_xpath.cpp b/tests/test_xpath.cpp index ea77121..8359f4f 100644 --- a/tests/test_xpath.cpp +++ b/tests/test_xpath.cpp @@ -430,11 +430,11 @@ TEST_XML(xpath_out_of_memory_evaluate_union, " CHECK_ALLOC_FAIL(CHECK(q.evaluate_node_set(doc.child(STR("node"))).empty())); } -TEST_XML(xpath_out_of_memory_evaluate_predicate, "") +TEST_XML(xpath_out_of_memory_evaluate_predicate, "") { test_runner::_memory_fail_threshold = 32768 + 4096 * 2; - pugi::xpath_query q(STR("//a[//a[//a[//a[//a[//a[//a[//a[//a[//a[//a[//a[//a[//a[true()]]]]]]]]]]]]]]")); + pugi::xpath_query q(STR("//a[//a[//a[//a[true()]]]]")); CHECK_ALLOC_FAIL(CHECK(q.evaluate_node_set(doc).empty())); } -- cgit v1.2.3