libvieter/test/heap/test_heap.c

20 lines
422 B
C

#include "acutest.h"
#include "vieter_heap.h"
#include "vieter_heap_tree.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}
};