Lines Matching refs:CHECK
60 if (CHECK(err != -ENOENT, "hashmap__update", in test_hashmap_generic()
68 if (CHECK(oldk != 0 || oldv != 0, "check_kv", in test_hashmap_generic()
73 if (CHECK(err, "elem_add", "failed to add k/v %ld = %ld: %d\n", k, v, err)) in test_hashmap_generic()
76 if (CHECK(!hashmap__find(map, k, &oldv), "elem_find", in test_hashmap_generic()
79 if (CHECK(oldv != v, "elem_val", "found value is wrong: %ld\n", oldv)) in test_hashmap_generic()
83 if (CHECK(hashmap__size(map) != ELEM_CNT, "hashmap__size", in test_hashmap_generic()
86 if (CHECK(hashmap__capacity(map) != exp_cap(hashmap__size(map)), in test_hashmap_generic()
97 if (CHECK(v - k != 1024, "check_kv", in test_hashmap_generic()
101 if (CHECK(found_msk != (1ULL << ELEM_CNT) - 1, "elem_cnt", in test_hashmap_generic()
110 if (CHECK(err != -EEXIST, "hashmap__add", in test_hashmap_generic()
119 if (CHECK(err, "elem_upd", in test_hashmap_generic()
123 if (CHECK(!hashmap__find(map, k, &oldv), "elem_find", in test_hashmap_generic()
126 if (CHECK(oldv != v, "elem_val", in test_hashmap_generic()
131 if (CHECK(hashmap__size(map) != ELEM_CNT, "hashmap__size", in test_hashmap_generic()
134 if (CHECK(hashmap__capacity(map) != exp_cap(hashmap__size(map)), in test_hashmap_generic()
145 if (CHECK(v - k != 256, "elem_check", in test_hashmap_generic()
149 if (CHECK(found_msk != (1ULL << ELEM_CNT) - 1, "elem_cnt", in test_hashmap_generic()
157 if (CHECK(!found_cnt, "found_cnt", in test_hashmap_generic()
173 if (CHECK(!hashmap__delete(map, k, &oldk, &oldv), "elem_del", in test_hashmap_generic()
176 if (CHECK(oldk != k || oldv != v, "check_old", in test_hashmap_generic()
180 if (CHECK(hashmap__delete(map, k, &oldk, &oldv), "elem_del", in test_hashmap_generic()
185 if (CHECK(!found_cnt || !found_msk, "found_entries", in test_hashmap_generic()
188 if (CHECK(hashmap__size(map) != ELEM_CNT - found_cnt, "elem_cnt", in test_hashmap_generic()
192 if (CHECK(hashmap__capacity(map) != exp_cap(hashmap__size(map)), in test_hashmap_generic()
207 if (CHECK(!hashmap__delete(map, k, &oldk, &oldv), "elem_del", in test_hashmap_generic()
210 if (CHECK(oldk != k || oldv != v, "elem_check", in test_hashmap_generic()
214 if (CHECK(hashmap__delete(map, k, &oldk, &oldv), "elem_del", in test_hashmap_generic()
219 if (CHECK(found_cnt != ELEM_CNT || found_msk != (1ULL << ELEM_CNT) - 1, in test_hashmap_generic()
224 if (CHECK(hashmap__size(map) != 0, "hashmap__size", in test_hashmap_generic()
231 CHECK(false, "elem_exists", in test_hashmap_generic()
239 CHECK(false, "elem_exists", in test_hashmap_generic()
268 if (CHECK(!map, "hashmap__new", "can't allocate hashmap\n")) in test_hashmap_ptr_iface()
272 CHECK(strcmp(var, (expected)), (fn), \ in test_hashmap_ptr_iface()
276 if (CHECK(err, "hashmap__insert", "unexpected error: %d\n", err)) in test_hashmap_ptr_iface()
280 if (CHECK(err, "hashmap__insert", "unexpected error: %d\n", err)) in test_hashmap_ptr_iface()
286 if (CHECK(err, "hashmap__add", "unexpected error: %d\n", err)) in test_hashmap_ptr_iface()
290 if (CHECK(err, "hashmap__set", "unexpected error: %d\n", err)) in test_hashmap_ptr_iface()
296 if (CHECK(err, "hashmap__update", "unexpected error: %d\n", err)) in test_hashmap_ptr_iface()
302 if (CHECK(err, "hashmap__append", "unexpected error: %d\n", err)) in test_hashmap_ptr_iface()
305 if (CHECK(!hashmap__delete(map, "c", &old_key, &old_value), in test_hashmap_ptr_iface()
311 CHECK(!hashmap__find(map, "b", &value), "hashmap__find", "can't find value for 'b'\n"); in test_hashmap_ptr_iface()
314 if (CHECK(!hashmap__delete(map, "b", NULL, NULL), in test_hashmap_ptr_iface()
320 if (CHECK(i != 0, "hashmap__for_each_entry", "too many entries")) in test_hashmap_ptr_iface()
357 if (CHECK(err, "elem_add", "failed to add k/v: %d\n", err)) in test_hashmap_multimap()
360 if (CHECK(err, "elem_add", "failed to add k/v: %d\n", err)) in test_hashmap_multimap()
363 if (CHECK(err, "elem_add", "failed to add k/v: %d\n", err)) in test_hashmap_multimap()
367 if (CHECK(err, "elem_add", "failed to add k/v: %d\n", err)) in test_hashmap_multimap()
370 if (CHECK(err, "elem_add", "failed to add k/v: %d\n", err)) in test_hashmap_multimap()
373 if (CHECK(err, "elem_add", "failed to add k/v: %d\n", err)) in test_hashmap_multimap()
376 if (CHECK(hashmap__size(map) != 6, "hashmap_size", in test_hashmap_multimap()
385 if (CHECK(found_msk != (1 << 6) - 1, "found_msk", in test_hashmap_multimap()
394 if (CHECK(found_msk != (1 | 2 | 4), "found_msk", in test_hashmap_multimap()
403 if (CHECK(found_msk != (8 | 16 | 32), "found_msk", in test_hashmap_multimap()
423 if (CHECK(hashmap__size(map) != 0, "hashmap__size", in test_hashmap_empty()
426 if (CHECK(hashmap__capacity(map) != 0, "hashmap__capacity", in test_hashmap_empty()
429 if (CHECK(hashmap__find(map, k, NULL), "elem_find", in test_hashmap_empty()
432 if (CHECK(hashmap__delete(map, k, NULL, NULL), "elem_del", in test_hashmap_empty()
437 CHECK(false, "elem_found", "unexpected iterated entry\n"); in test_hashmap_empty()
441 CHECK(false, "key_found", "unexpected key entry\n"); in test_hashmap_empty()