From 3d2b1b82bd1bf016d6fc5091bcec5c61bacabd70 Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Sun, 2 Nov 2025 15:51:24 -0500 Subject: Added an interface to access free list and updated tests to use it --- tests/liballoc_tests.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/liballoc_tests.c') diff --git a/tests/liballoc_tests.c b/tests/liballoc_tests.c index ad9635f..cfd976a 100644 --- a/tests/liballoc_tests.c +++ b/tests/liballoc_tests.c @@ -51,7 +51,11 @@ START_TEST(basic_release) { release(memory); - // TODO: verify entry on the free list + free_nd *list_head = free_list_head(); + ck_assert_ptr_nonnull(list_head); + ck_assert_ptr_eq(list_head, memory); + ck_assert_int_eq(list_head->size, ALIGNMENT*3); + ck_assert_ptr_null(list_head->next); } END_TEST @@ -59,7 +63,7 @@ START_TEST(release_null) { /* releasing NULL should take no action */ release(NULL); - // TODO: verify no entry on free list + ck_assert_ptr_null(free_list_head()); } END_TEST -- cgit v1.2.3