aboutsummaryrefslogtreecommitdiff
path: root/test/test-htab.c
diff options
context:
space:
mode:
authorcomex2015-07-12 17:49:43 -0400
committercomex2015-07-12 17:49:43 -0400
commitfc1752a7c3e90ec7d604e9a148482c106672c27b (patch)
tree2ef55bf39cc01ef7893fb650189fbdb4a0de0026 /test/test-htab.c
parentredo crash reporting - untested (but it compiles) (diff)
downloadsubstitute-fc1752a7c3e90ec7d604e9a148482c106672c27b.tar.gz
fixes
Diffstat (limited to '')
-rw-r--r--test/test-htab.c6
1 files changed, 4 insertions, 2 deletions
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";