From 9593fc545950782ed75f12f53238b07885559b2b Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 9 Jul 2018 22:28:25 -0700 Subject: remove ccan for now --- ccan/htable/test/run-size.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 ccan/htable/test/run-size.c (limited to 'ccan/htable/test/run-size.c') diff --git a/ccan/htable/test/run-size.c b/ccan/htable/test/run-size.c deleted file mode 100644 index 1a2f5cd..0000000 --- a/ccan/htable/test/run-size.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include -#include -#include -#include - -#define NUM_VALS 512 - -/* We use the number divided by two as the hash (for lots of - collisions). */ -static size_t hash(const void *elem, void *unused UNNEEDED) -{ - size_t h = *(uint64_t *)elem / 2; - return h; -} - -int main(void) -{ - struct htable ht; - uint64_t val[NUM_VALS]; - unsigned int i; - - plan_tests((NUM_VALS) * 2); - for (i = 0; i < NUM_VALS; i++) - val[i] = i; - - htable_init(&ht, hash, NULL); - for (i = 0; i < NUM_VALS; i++) { - ok1(ht.max >= i); - ok1(ht.max <= i * 2); - htable_add(&ht, hash(&val[i], NULL), &val[i]); - } - htable_clear(&ht); - - return exit_status(); -} -- cgit v1.2.3