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

Function test_hashmap__intern

t/unit-tests/u-hashmap.c:287–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287void test_hashmap__intern(void)
288{
289 const char *values[] = { "value1", "Value1", "value2", "value2" };
290
291 for (size_t i = 0; i < ARRAY_SIZE(values); i++) {
292 const char *i1 = strintern(values[i]);
293 const char *i2 = strintern(values[i]);
294
295 cl_assert_equal_s(i1, values[i]);
296 cl_assert(i1 != values[i]);
297 cl_assert_equal_p(i1, i2);
298 }
299}
300
301void test_hashmap__replace_case_sensitive(void)
302{

Callers

nothing calls this directly

Calls 1

strinternFunction · 0.85

Tested by

no test coverage detected