Extend bloom filter test to check item count is correct

This commit is contained in:
Vincent Sanders 2015-07-10 11:31:48 +01:00
parent 94b5c95676
commit 2e7b69be0a
1 changed files with 4 additions and 0 deletions

View File

@ -77,9 +77,13 @@ START_TEST(bloom_create_test)
{
struct bloom_filter *b;
b = bloom_create(BLOOM_SIZE);
bloom_insert_str(b, "NetSurf", 7);
ck_assert(bloom_search_str(b, "NetSurf", 7));
ck_assert(!bloom_search_str(b, "NotSurf", 7));
ck_assert(bloom_items(b) == 1);
bloom_destroy(b);
}
END_TEST