chiark / gitweb /
Remove some obsolete code
[disorder] / lib / t-heap.c
index c3e4a03f934f1bcfec6bf67e8af996bca6ae6ca7..54d052a5dd9226adf8ceecbf31136b421a5f52ad 100644 (file)
@@ -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