| 124 | } |
| 125 | |
| 126 | void test_oidmap__iterate(void) |
| 127 | { |
| 128 | struct oidmap_iter iter; |
| 129 | struct test_entry *entry; |
| 130 | char seen[ARRAY_SIZE(key_val)] = { 0 }; |
| 131 | int count = 0; |
| 132 | |
| 133 | oidmap_iter_init(&map, &iter); |
| 134 | while ((entry = oidmap_iter_next(&iter))) { |
| 135 | if (key_val_contains(entry, seen) != 0) { |
| 136 | cl_failf("Unexpected entry: name = %s, oid = %s", |
| 137 | entry->name, oid_to_hex(&entry->entry.oid)); |
| 138 | } |
| 139 | count++; |
| 140 | } |
| 141 | cl_assert_equal_i(count, ARRAY_SIZE(key_val)); |
| 142 | cl_assert_equal_i(hashmap_get_size(&map.map), ARRAY_SIZE(key_val)); |
| 143 | } |
| 144 | |
| 145 | void test_oidmap__clear_without_free_callback(void) |
| 146 | { |
nothing calls this directly
no test coverage detected