aboutsummaryrefslogtreecommitdiffstats
path: root/tests/liballoc_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/liballoc_tests.c')
-rw-r--r--tests/liballoc_tests.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/liballoc_tests.c b/tests/liballoc_tests.c
index 16d50d6..a54998a 100644
--- a/tests/liballoc_tests.c
+++ b/tests/liballoc_tests.c
@@ -26,6 +26,10 @@ START_TEST(basic_allocate) {
size_t alignment = (size_t)memory % ALIGNMENT;
ck_assert_int_eq(alignment, 0);
+ /* allocating 0 size should return NULL */
+ void *memory2 = allocate(0);
+ ck_assert_ptr_eq(memory2, NULL);
+
/* leak the memory--we aren't testing release */
}
END_TEST