From fc1752a7c3e90ec7d604e9a148482c106672c27b Mon Sep 17 00:00:00 2001 From: comex Date: Sun, 12 Jul 2015 17:49:43 -0400 Subject: fixes --- test/test-htab.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test-htab.c b/test/test-htab.c index 9be59a3..c85d620 100644 --- a/test/test-htab.c +++ b/test/test-htab.c @@ -30,8 +30,8 @@ int main() { struct htab_teststr_int *hp; - HTAB_STORAGE(teststr_int) stor; - HTAB_STORAGE_INIT(&stor, teststr_int); + HTAB_STORAGE(teststr_int) stor = HTAB_STORAGE_INIT_STATIC(&stor, teststr_int); + /*HTAB_STORAGE_INIT(&stor, teststr_int);*/ hp = &stor.h; for(int i = 0; i < 100; i++) { const char *k; @@ -39,6 +39,8 @@ int main() { bool new; *htab_setp_teststr_int(hp, &k, &new) = i; assert(new); + assert(htab_getbucket_teststr_int(hp, &k)->value == i); + assert(*htab_getp_teststr_int(hp, &k) == i); } { const char *k = "foo31"; -- cgit v1.2.3