summaryrefslogtreecommitdiff
path: root/tests/test_dom_modify.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-12 03:14:08 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-12 03:14:08 -0700
commit6c11a0c693da9ccf38225471d614bde162312427 (patch)
tree7e162c9d18d066514608bacf17511403e4da2523 /tests/test_dom_modify.cpp
parenta19da1c246f244da57197915df3ab70f24bf1502 (diff)
Fix compilation and tests after merge.
Diffstat (limited to 'tests/test_dom_modify.cpp')
-rw-r--r--tests/test_dom_modify.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp
index 47c4a04..071b798 100644
--- a/tests/test_dom_modify.cpp
+++ b/tests/test_dom_modify.cpp
@@ -1115,6 +1115,11 @@ TEST(dom_node_append_buffer_out_of_memory_nodes)
test_runner::_memory_fail_threshold = 32768 + 128 + data.length() * sizeof(char_t) + 32;
+#ifdef PUGIXML_COMPACT
+ // ... and some space for hash table
+ test_runner::_memory_fail_threshold += 2048;
+#endif
+
xml_document doc;
CHECK_ALLOC_FAIL(CHECK(doc.append_buffer(data.c_str(), data.length() * sizeof(char_t), parse_fragment).status == status_out_of_memory));
@@ -1131,9 +1136,9 @@ TEST(dom_node_append_buffer_out_of_memory_nodes)
TEST(dom_node_append_buffer_out_of_memory_name)
{
- test_runner::_memory_fail_threshold = 32768 + 128;
+ test_runner::_memory_fail_threshold = 32768 + 4096;
- char data[128] = {0};
+ char data[4096] = {0};
xml_document doc;
CHECK(doc.append_child(STR("root")));
@@ -1459,6 +1464,11 @@ TEST(dom_node_copy_attribute_copyless)
// the document is parsed in-place so there should only be 1 page worth of allocations
test_runner::_memory_fail_threshold = 32768 + 128;
+#ifdef PUGIXML_COMPACT
+ // ... and some space for hash table
+ test_runner::_memory_fail_threshold += 2048;
+#endif
+
xml_document doc;
CHECK(doc.load_buffer_inplace(&datacopy[0], datacopy.size() * sizeof(char_t), parse_full));