diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-06-13 19:24:20 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-06-13 19:24:20 +0000 |
commit | ab72b14d17a1f80ee049cdd8c77e973960fea108 (patch) | |
tree | 9e86e841eb0e5c2ca73198bdce2718e80e25317d /tests/main.cpp | |
parent | e5014db32a79816c3a114b3de586ae28beb28c95 (diff) |
Internal XML parsing error handling is done via setjmp/longjmp, all allocation errors are now handled correctly (parser returns status_out_of_memory, modification functions return errors); added tests for some out of memory situations
git-svn-id: http://pugixml.googlecode.com/svn/trunk@520 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/main.cpp')
-rw-r--r-- | tests/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/main.cpp b/tests/main.cpp index 444b188..b8d4e53 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -15,7 +15,7 @@ static size_t g_memory_total_count = 0; static void* custom_allocate(size_t size)
{
- if (test_runner::_memory_fail_threshold > 0 && test_runner::_memory_fail_threshold < size)
+ if (test_runner::_memory_fail_threshold > 0 && test_runner::_memory_fail_threshold < g_memory_total_size + size)
return 0;
else
{
|