| 84 | } |
| 85 | |
| 86 | void test_oidmap__remove(void) |
| 87 | { |
| 88 | struct test_entry *entry; |
| 89 | struct object_id oid; |
| 90 | |
| 91 | cl_parse_any_oid("11", &oid); |
| 92 | entry = oidmap_remove(&map, &oid); |
| 93 | cl_assert(entry != NULL); |
| 94 | cl_assert_equal_s(entry->name, "one"); |
| 95 | cl_assert(oidmap_get(&map, &oid) == NULL); |
| 96 | free(entry); |
| 97 | |
| 98 | cl_parse_any_oid("22", &oid); |
| 99 | entry = oidmap_remove(&map, &oid); |
| 100 | cl_assert(entry != NULL); |
| 101 | cl_assert_equal_s(entry->name, "two"); |
| 102 | cl_assert(oidmap_get(&map, &oid) == NULL); |
| 103 | free(entry); |
| 104 | |
| 105 | cl_parse_any_oid("44", &oid); |
| 106 | cl_assert(oidmap_remove(&map, &oid) == NULL); |
| 107 | } |
| 108 | |
| 109 | static int key_val_contains(struct test_entry *entry, char seen[]) |
| 110 | { |
nothing calls this directly
no test coverage detected