| 79 | } |
| 80 | |
| 81 | static void t_replace(struct hashmap *map, unsigned int ignore_case) |
| 82 | { |
| 83 | struct test_entry *entry; |
| 84 | |
| 85 | entry = alloc_test_entry("key1", "value1", ignore_case); |
| 86 | cl_assert_equal_p(hashmap_put_entry(map, entry, ent), NULL); |
| 87 | |
| 88 | entry = alloc_test_entry(ignore_case ? "Key1" : "key1", "value2", |
| 89 | ignore_case); |
| 90 | entry = hashmap_put_entry(map, entry, ent); |
| 91 | cl_assert(entry != NULL); |
| 92 | cl_assert_equal_s(get_value(entry), "value1"); |
| 93 | free(entry); |
| 94 | |
| 95 | entry = alloc_test_entry("fooBarFrotz", "value3", ignore_case); |
| 96 | cl_assert_equal_p(hashmap_put_entry(map, entry, ent), NULL); |
| 97 | |
| 98 | entry = alloc_test_entry(ignore_case ? "FOObarFrotz" : "fooBarFrotz", |
| 99 | "value4", ignore_case); |
| 100 | entry = hashmap_put_entry(map, entry, ent); |
| 101 | cl_assert(entry != NULL); |
| 102 | cl_assert_equal_s(get_value(entry), "value3"); |
| 103 | free(entry); |
| 104 | } |
| 105 | |
| 106 | static void t_get(struct hashmap *map, unsigned int ignore_case) |
| 107 | { |
nothing calls this directly
no test coverage detected