mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-28 14:48:43 +08:00
tests: Add query out of memory test
This commit is contained in:
parent
6abf1d7c1a
commit
8aa8e11ba6
@ -418,6 +418,13 @@ TEST(xpath_api_empty)
|
|||||||
CHECK(!q.evaluate_boolean(c));
|
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
|
#ifdef PUGIXML_HAS_MOVE
|
||||||
TEST_XML(xpath_api_nodeset_move_ctor, "<node><foo/><foo/><bar/></node>")
|
TEST_XML(xpath_api_nodeset_move_ctor, "<node><foo/><foo/><bar/></node>")
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user