30 lines
602 B
C
30 lines
602 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 "pauldb/storage.h"
|
|
|
|
#include <assert.h>
|
|
#include <stdio.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");
|
|
}
|
|
|
|
static void
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
printf("=== test_page ===\n");
|
|
test_create_returns_non_null();
|
|
printf("All tests passed.\n");
|
|
return 0;
|
|
} |