XPath: Fix unit test that (incorrectly) relied on right-associativity of union operator to trigger out of memory condition

git-svn-id: http://pugixml.googlecode.com/svn/trunk@930 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine@gmail.com 2012-11-17 23:51:43 +00:00
parent 48f9343c05
commit cee7eca229

View file

@ -382,7 +382,7 @@ TEST_XML(xpath_out_of_memory_evaluate_union, "<node><a/><a/><a/><a/><a/><a/><a/>
{
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|a|a|a|a|a|a|a"));
pugi::xpath_query q(STR("a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|(a|a)))))))))))))))))))"));
#ifdef PUGIXML_NO_EXCEPTIONS
CHECK(q.evaluate_node_set(doc.child(STR("node"))).empty());