081bd9041b
format: storage.h
35 lines
573 B
C
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;
|
|
}
|