| 107 | } |
| 108 | |
| 109 | void test_oidtree__insert_overwrites_data(void) |
| 110 | { |
| 111 | struct object_id oid; |
| 112 | struct oidtree ot; |
| 113 | int a, b; |
| 114 | |
| 115 | cl_parse_any_oid("1", &oid); |
| 116 | |
| 117 | oidtree_init(&ot); |
| 118 | |
| 119 | oidtree_insert(&ot, &oid, NULL); |
| 120 | cl_assert_equal_p(oidtree_get(&ot, &oid), NULL); |
| 121 | oidtree_insert(&ot, &oid, &a); |
| 122 | cl_assert_equal_p(oidtree_get(&ot, &oid), &a); |
| 123 | oidtree_insert(&ot, &oid, &b); |
| 124 | cl_assert_equal_p(oidtree_get(&ot, &oid), &b); |
| 125 | |
| 126 | oidtree_clear(&ot); |
| 127 | } |
nothing calls this directly
no test coverage detected