aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-ohash.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-ohash.c')
-rw-r--r--test-ohash.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/test-ohash.c b/test-ohash.c
new file mode 100644
index 00000000..72b3e3dd
--- /dev/null
+++ b/test-ohash.c
@@ -0,0 +1,19 @@
+#include <stdint.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <ohash.h>
+
+void *xalloc(size_t sz, void *arg) { return(calloc(sz,1)); }
+void xfree(void *p, size_t sz, void *arg) { free(p); }
+
+int
+main(void)
+{
+ struct ohash h;
+ struct ohash_info i;
+ i.halloc = i.alloc = xalloc;
+ i.free = free;
+ ohash_init(&h, 2, &i);
+ ohash_delete(&h);
+ return 0;
+}