summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-01-30 22:27:48 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-01-30 22:27:48 -0800
commit60d5688a87b03aa85b74026c1fb79fd0ca8903d7 (patch)
treee1ee198dbca66580557b071d2c7bbcd431201d54
parentc370d1190d3c1ac5ea59f0824db500f32a8594bd (diff)
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.
-rw-r--r--tests/test_xpath.cpp4
1 files 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, "<node><a/><a/><a/><a/><a/><a/><a/>
CHECK_ALLOC_FAIL(CHECK(q.evaluate_node_set(doc.child(STR("node"))).empty()));
}
-TEST_XML(xpath_out_of_memory_evaluate_predicate, "<node><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/></node>")
+TEST_XML(xpath_out_of_memory_evaluate_predicate, "<node><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/><a/></node>")
{
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()));
}