MCPcopy Create free account
hub / github.com/git/git / test_oidmap__get

Function test_oidmap__get

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

Source from the content-addressed store, hash-verified

65}
66
67void test_oidmap__get(void)
68{
69 struct test_entry *entry;
70 struct object_id oid;
71
72 cl_parse_any_oid("22", &oid);
73 entry = oidmap_get(&map, &oid);
74 cl_assert(entry != NULL);
75 cl_assert_equal_s(entry->name, "two");
76
77 cl_parse_any_oid("44", &oid);
78 cl_assert(oidmap_get(&map, &oid) == NULL);
79
80 cl_parse_any_oid("11", &oid);
81 entry = oidmap_get(&map, &oid);
82 cl_assert(entry != NULL);
83 cl_assert_equal_s(entry->name, "one");
84}
85
86void test_oidmap__remove(void)
87{

Callers

nothing calls this directly

Calls 2

cl_parse_any_oidFunction · 0.85
oidmap_getFunction · 0.85

Tested by

no test coverage detected