X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fstrset%2Ftest%2Frun-iterate-const.c;h=9f2b13e2634914231c3e2ff721da30ba171b070c;hp=42a1d73552b9541d19297770ad65bf9706e7b650;hb=bb2a75f445f408e43730fc55a1a978581ebe9b96;hpb=932aeb6dcc4a6df2d08755f743659451c9721447 diff --git a/ccan/strset/test/run-iterate-const.c b/ccan/strset/test/run-iterate-const.c index 42a1d735..9f2b13e2 100644 --- a/ccan/strset/test/run-iterate-const.c +++ b/ccan/strset/test/run-iterate-const.c @@ -9,7 +9,7 @@ static bool find_string(const char *str, const char *cmp) { if (strcmp(str, cmp) == 0) found = true; - return false; + return true; } int main(void) @@ -19,11 +19,11 @@ int main(void) plan_tests(3); strset_init(&set); - ok1(strset_set(&set, "hello")); - ok1(strset_set(&set, "world")); + ok1(strset_add(&set, "hello")); + ok1(strset_add(&set, "world")); strset_iterate(&set, find_string, (const char *)"hello"); ok1(found); - strset_destroy(&set); + strset_clear(&set); /* This exits depending on whether all tests passed */ return exit_status();