tests: Add a test for out-of-memory during copy
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1040 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
4d39ae9e45
commit
59409f70ef
@ -1344,3 +1344,12 @@ TEST_XML(dom_node_copyless_taint, "<node attr=\"value\" />")
|
|||||||
|
|
||||||
CHECK_NODE(doc, STR("<nod1 attr=\"value\" /><node attr=\"valu2\" /><node att3=\"value\" />"));
|
CHECK_NODE(doc, STR("<nod1 attr=\"value\" /><node attr=\"valu2\" /><node att3=\"value\" />"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_XML(dom_node_copy_out_of_memory, "<node><child1 attr1='value1' attr2='value2' /><child2 /><child3>text1<child4 />text2</child3></node>")
|
||||||
|
{
|
||||||
|
test_runner::_memory_fail_threshold = 32768 * 2 + 4096;
|
||||||
|
|
||||||
|
xml_document copy;
|
||||||
|
for (int i = 0; i < 100; ++i)
|
||||||
|
copy.append_copy(doc.first_child());
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user