diff options
| author | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2025-11-02 15:51:24 -0500 |
|---|---|---|
| committer | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2025-11-02 15:51:24 -0500 |
| commit | 3d2b1b82bd1bf016d6fc5091bcec5c61bacabd70 (patch) | |
| tree | 5df8feb9c8c974be0d5370e28f641286a8a17b05 /tests | |
| parent | a66d9582a16eb3c15bf727db84431660ae20b2f2 (diff) | |
| download | liballoc-3d2b1b82bd1bf016d6fc5091bcec5c61bacabd70.tar.gz | |
Added an interface to access free list and updated tests to use it
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/liballoc_tests.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 |