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) {
109
109
// Compare
110
110
CHECK (serialized == serialized_rebuild);
111
111
// Count it
112
- if (elements_0.size () <= capacity) ++counts[elements_0.size ()];
112
+ if (impl == 0 && elements_0.size () <= capacity) ++counts[elements_0.size ()];
113
113
}
114
114
}
115
115
}
116
116
117
117
// 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));
120
121
}
121
122
}
122
123
You can’t perform that action at this time.
0 commit comments