libvieter/test/heap/test_heap.c

19 lines
392 B
C
Raw Normal View History

2023-01-21 16:31:22 +01:00
#include "acutest.h"
#include "vieter_heap.h"
#define TEST_SIZE(heap, size) \
TEST_CHECK(vieter_heap_size(heap) == size); \
TEST_MSG("Size: %zu", vieter_heap_size(heap))
void test_init() {
vieter_heap *heap = vieter_heap_init();
TEST_CHECK(heap != NULL);
TEST_SIZE(heap, 0);
vieter_heap_free(heap);
}
TEST_LIST = {
{"test_init", test_init},
{NULL, NULL}
};