summaryrefslogtreecommitdiff
path: root/tests/test_parse.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-03 08:03:23 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-03 08:03:23 +0000
commit085584aa30b79e7755ffdf50882f7decfd4336be (patch)
treebef6269609b46a25a7e823bbba3716b2423e0e83 /tests/test_parse.cpp
parent4f6ecee14cbbf72009ef1c7c27007773c9efa385 (diff)
tests: Preparations for custom new/delete (leak detection)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@620 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_parse.cpp')
-rw-r--r--tests/test_parse.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_parse.cpp b/tests/test_parse.cpp
index a997692..c7e3ae3 100644
--- a/tests/test_parse.cpp
+++ b/tests/test_parse.cpp
@@ -613,8 +613,8 @@ TEST(parse_out_of_memory)
TEST(parse_out_of_memory_halfway)
{
- unsigned int count = 10000;
- char_t* text = new char_t[count * 4];
+ const unsigned int count = 10000;
+ static char_t text[count * 4];
for (unsigned int i = 0; i < count; ++i)
{
@@ -629,8 +629,6 @@ TEST(parse_out_of_memory_halfway)
xml_document doc;
CHECK(doc.load_buffer_inplace(text, count * 4).status == status_out_of_memory);
CHECK_NODE(doc.first_child(), STR("<n />"));
-
- delete[] text;
}
static bool test_offset(const char_t* contents, unsigned int options, pugi::xml_parse_status status, ptrdiff_t offset)