test: page_insert

This commit is contained in:
paulhorn
2026-06-21 20:42:27 +02:00
parent 77b446f264
commit b49c55880c
+11
View File
@@ -18,11 +18,22 @@ test_create_returns_non_null(void)
printf(" OK: page_create(42) returns non-NULL\n");
}
static void
test_insert_returns_slot_id(void)
{
Page * p = page_create(4);
int slot_id = page_insert(p, "Hallo", 5);
assert(slot_id == 0);
page_free(p);
printf(" OK: Insert\n");
}
int
main(void)
{
printf("=== test_page ===\n");
test_create_returns_non_null();
test_insert_returns_slot_id();
printf("All tests passed.\n");
return 0;
}