X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/b90f122bd10bd896f2f9b0cf5676bcd436a7d42e..a4243347741f0f7079858e03bca8fc32990f525c:/lib/t-heap.c diff --git a/lib/t-heap.c b/lib/t-heap.c index c3e4a03..54d052a 100644 --- a/lib/t-heap.c +++ b/lib/t-heap.c @@ -28,13 +28,11 @@ HEAP_TYPE(iheap, int, int_lt); HEAP_DEFINE(iheap, int, int_lt); /** @brief Tests for @ref heap.h */ -void test_heap(void) { +static void test_heap(void) { struct iheap h[1]; int n; int last = -1; - fprintf(stderr, "test_heap\n"); - iheap_init(h); for(n = 0; n < 1000; ++n) iheap_insert(h, random() % 100); @@ -45,9 +43,10 @@ void test_heap(void) { insist(last <= latest); last = latest; } - putchar('\n'); } +TEST(heap); + /* Local Variables: c-basic-offset:2