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

Function key_val_contains

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

Source from the content-addressed store, hash-verified

55}
56
57static int key_val_contains(const char *key_val[][2], char seen[], size_t n,
58 struct test_entry *entry)
59{
60 for (size_t i = 0; i < n; i++) {
61 if (!strcmp(entry->key, key_val[i][0]) &&
62 !strcmp(get_value(entry), key_val[i][1])) {
63 if (seen[i])
64 return 2;
65 seen[i] = 1;
66 return 0;
67 }
68 }
69 return 1;
70}
71
72static void setup(void (*f)(struct hashmap *map, unsigned int ignore_case),
73 unsigned int ignore_case)

Callers 2

t_addFunction · 0.70
t_iterateFunction · 0.70

Calls 1

get_valueFunction · 0.70

Tested by

no test coverage detected