MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / init_simple_phmap

Function init_simple_phmap

tests/test_phmap.h:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67};
68
69void inline init_simple_phmap(ParallelFlatHashMap<String, int> &thingy) {
70 for (int i = 0; i < SIMPLE_TEST_MAX_ITERS; i += 2) {
71 auto str = String::num_int64(i);
72 thingy[str] = i;
73 }
74 for (int i = 0; i < SIMPLE_TEST_MAX_ITERS; i++) {
75 auto str = String::num_int64(i);
76 if (i % 2 == 0) {
77 CHECK(thingy.contains(str));
78 } else {
79 CHECK_FALSE(thingy.contains(str));
80 }
81 }
82}
83
84void inline check_phmap(ParallelFlatHashMap<String, int> &thingy) {
85 for (int i = 0; i < SIMPLE_TEST_MAX_ITERS; i++) {

Callers 1

test_phmap.hFile · 0.85

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected