MCPcopy Index your code
hub / github.com/git/git / test_oidmap__replace

Function test_oidmap__replace

t/unit-tests/u-oidmap.c:48–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void test_oidmap__replace(void)
49{
50 struct test_entry *entry, *prev;
51
52 FLEX_ALLOC_STR(entry, name, "un");
53 cl_parse_any_oid("11", &entry->entry.oid);
54 prev = oidmap_put(&map, entry);
55 cl_assert(prev != NULL);
56 cl_assert_equal_s(prev->name, "one");
57 free(prev);
58
59 FLEX_ALLOC_STR(entry, name, "deux");
60 cl_parse_any_oid("22", &entry->entry.oid);
61 prev = oidmap_put(&map, entry);
62 cl_assert(prev != NULL);
63 cl_assert_equal_s(prev->name, "two");
64 free(prev);
65}
66
67void test_oidmap__get(void)
68{

Callers

nothing calls this directly

Calls 2

cl_parse_any_oidFunction · 0.85
oidmap_putFunction · 0.85

Tested by

no test coverage detected