Files
PaulDB/test/storage/test_page.c
T
2026-06-20 20:46:49 +02:00

35 lines
573 B
C

/* test/storage/test_page.c
*
* TDD-Zyklus: test_page_create
* RED -> diese Datei schreiben, noch kein page.c -> Linker-Fehler
* GREEN -> page_create() + page_free() in page.c implementieren
*/
#include <assert.h>
#include <stdio.h>
#include "pauldb/storage.h"
static void
test_create_returns_non_null
(
void
)
{
Page *p = page_create(42);
assert(p != NULL);
page_free(p);
printf(" OK: page_create(42) returns non-NULL\n");
}
int
main
(
void
)
{
printf("=== test_page ===\n");
test_create_returns_non_null();
printf("All tests passed.\n");
return 0;
}