Commit c1a4488
committed
Merge #51: Fix exhaustive test check
294b6c5 Use correct flags variable for c-i (Cory Fields)
8d52856 Fix exhaustive test check (Pieter Wuille)
Pull request description:
There were 3 issues:
1. The comparison between `counts[...]` and `Combination()` wasn't running at all (`(i >> bits)` is always 0 for i==0, so the loop would instantly exit).
2. The `counts` values were wrong (because it was counting a sum across all implementation), so if they would be compared to something, the test would incorrectly fail.
3. `(i >> bits)` is undefined when bits==64.
(1) would be fixed by changing `i >> bits` to `(i >> bits) == 0`, but that leaves issue (3), so introduce a `mask` and use a different way of writing the same, that keeps working for bits==64. (2) is fixed by only incrementing counts[...] for impl==0.
This was discovered through #50.
ACKs for top commit:
naumenkogs:
ACK 294b6c5
Tree-SHA512: 770af770898fb82abf390b7cd21f6ac8657d16dbf391c1d5825c62a3c17c8d50a36481f91254020bd00bfdda493507406df2110292fe8edc396db28181ca94b52 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
0 commit comments