diff options
| author | mo khan <mo.khan@gmail.com> | 2020-08-03 14:51:44 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-08-03 14:51:44 -0600 |
| commit | bb8ead8115ded0bb466f54222b8f0273d34958e5 (patch) | |
| tree | f8379a9cd9659d7bb93699bc5de05811c1debe1f | |
| parent | ff6613d40afa4eecf8c1ec49ae75ee38daf44e03 (diff) | |
Enable test to produce hash collision
| -rw-r--r-- | src/02/04/hash_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/02/04/hash_test.c b/src/02/04/hash_test.c index 3d940f5..cbce7d8 100644 --- a/src/02/04/hash_test.c +++ b/src/02/04/hash_test.c @@ -30,8 +30,8 @@ Ensure(HashTable, when_getting_a_values_for_a_key_that_has_been_inserted) { Ensure(HashTable, when_a_hash_collision_occurs) { Hash *hash = hash_init(13); - /*hash_set(hash, 8, 80);*/ - /*hash_set(hash, 21, 210);*/ + hash_set(hash, 8, (void *)80); + hash_set(hash, 21, (void *)210); assert_that(hash_get(hash, 8), is_equal_to(80)); assert_that(hash_get(hash, 21), is_equal_to(210)); @@ -43,7 +43,7 @@ TestSuite *hash_table_tests() { add_test_with_context(suite, HashTable, when_initializing_a_hash); add_test_with_context(suite, HashTable, when_getting_a_value_for_a_key_that_has_not_been_inserted); add_test_with_context(suite, HashTable, when_getting_a_values_for_a_key_that_has_been_inserted); - /*add_test_with_context(suite, HashTable, when_a_hash_collision_occurs);*/ + add_test_with_context(suite, HashTable, when_a_hash_collision_occurs); return suite; } |
