forked from vieter-v/libvieter
feat(heap): code skeleton
This commit is contained in:
parent
ad8c37c9ea
commit
050e99b413
4 changed files with 73 additions and 1 deletions
18
test/heap/test_heap.c
Normal file
18
test/heap/test_heap.c
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#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}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue