diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-06-15 07:17:26 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-06-15 07:23:49 -0700 |
commit | c40fd364ce856405f86fcc67250d36480e3712b8 (patch) | |
tree | 187e0aec95c655e10555bec92320acf60c068290 /tests/main.cpp | |
parent | 0fbc043183e4723961d6caa99bf9bb77c5edfb83 (diff) |
tests: Add tests for loading special files
New tests try to load a folder as an XML document, and a device. Both
are intended to exercise some otherwise non-hittable error paths in
load_file implementation.
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 712edda..352b58b 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -41,7 +41,7 @@ static void* custom_allocate(size_t size) else { void* ptr = memory_allocate(size); - assert(ptr); + if (!ptr) return 0; g_memory_total_size += memory_size(ptr); g_memory_total_count++; |