From 416f3c75b79741b63f4841b2ae00f2d535672b03 Mon Sep 17 00:00:00 2001 From: Stephan Soller Date: Wed, 12 Jul 2017 21:46:47 +0200 Subject: [PATCH] Removed test case for the Slim Hash optimize() function. --- tests/slim_hash_test.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tests/slim_hash_test.c b/tests/slim_hash_test.c index de57ff9..96f66fc 100644 --- a/tests/slim_hash_test.c +++ b/tests/slim_hash_test.c @@ -204,26 +204,6 @@ void test_shrinking() { sh_destroy(&hash); } -void test_optimize() { - sh_t hash; - sh_new(&hash); - - for(size_t i = 0; i < 100; i++) - sh_put(&hash, i, i*2); - st_check(hash.capacity >= 100); - - for(size_t i = 0; i < 30; i++) - sh_del(&hash, i); - st_check_int(hash.length, 70); - st_check(hash.deleted > 0); - - sh_optimize(&hash); - st_check_int(hash.length, 70); - st_check_int(hash.deleted, 0); - - sh_destroy(&hash); -} - void test_dict() { dict_t dict; dict_new(&dict); @@ -379,7 +359,6 @@ int main() { st_run(test_remove_during_iteration); st_run(test_growing); st_run(test_shrinking); - st_run(test_optimize); st_run(test_dict); st_run(test_dict_update); st_run(test_example); -- 2.20.1