| 49 | t_enumeration(input, ARRAY_SIZE(input), expect, ARRAY_SIZE(expect)); |
| 50 | |
| 51 | static void t_lookup(const char **input_hexes, size_t n, const char *query_hex, |
| 52 | int lower_bound, int upper_bound) |
| 53 | { |
| 54 | struct oid_array array = OID_ARRAY_INIT; |
| 55 | struct object_id oid_query; |
| 56 | int ret; |
| 57 | |
| 58 | cl_parse_any_oid(query_hex, &oid_query); |
| 59 | fill_array(&array, input_hexes, n); |
| 60 | ret = oid_array_lookup(&array, &oid_query); |
| 61 | |
| 62 | cl_assert(ret <= upper_bound); |
| 63 | cl_assert(ret >= lower_bound); |
| 64 | |
| 65 | oid_array_clear(&array); |
| 66 | } |
| 67 | |
| 68 | #define TEST_LOOKUP(input_hexes, query, lower_bound, upper_bound) \ |
| 69 | t_lookup(input_hexes, ARRAY_SIZE(input_hexes), query, \ |
nothing calls this directly
no test coverage detected