File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -109,14 +109,15 @@ void TestExhaustive(uint32_t bits, size_t capacity) {
109109 // Compare
110110 CHECK (serialized == serialized_rebuild);
111111 // Count it
112- if (elements_0.size () <= capacity) ++counts[elements_0.size ()];
112+ if (impl == 0 && elements_0.size () <= capacity) ++counts[elements_0.size ()];
113113 }
114114 }
115115 }
116116
117117 // Verify that the number of decodable sketches with given elements is expected.
118- for (uint64_t i = 0 ; i <= capacity && i >> bits; ++i) {
119- CHECK (counts[i] == Combination ((uint64_t {1 } << bits) - 1 , i));
118+ uint64_t mask = bits == 64 ? UINT64_MAX : (uint64_t {1 } << bits) - 1 ;
119+ for (uint64_t i = 0 ; i <= capacity && (i & mask) == i; ++i) {
120+ CHECK (counts[i] == Combination (mask, i));
120121 }
121122}
122123
You can’t perform that action at this time.
0 commit comments