Commit 1eec42e
committed
Fix
Due to ABI differences between different 32-bit targets, the
`size_of_hasher` test wrongly failed on `i686-pc-windows-msvc`.
Although the test case with that name was introduced in GitoxideLabs#1915, the
failure is actually long-standing, in that an analogous faiure
occurred in the old `size_of_sha1` test that preceded it and on
which it is based. That failure only happened when the old
`fast-sha1` feature was enabled, and not with the old `rustsha1`
feature. It was not detected earlier as that target is irregularly
tested, and built with `--no-default-features --features max-pure`
more often than other targets due to difficulties building some
other non-Rust dependencies for it. Since GitoxideLabs#1915, the failure
happens more often, since we now use only one SHA-1 implementation,
`sha1-checked`, so the test always fails on `i686-pc-windows-msvc`.
This changes the test to use `gix_testtools::size_ok`, which makes
a `==` comparison on 64-bit targets but a `<=` comparison on 32-bit
targets where there tends to be more variation in data structures'
sizes. This is similar to the fixes in GitoxideLabs#1687 (77c3c59, fc13fc3).size_of_hasher test for 32-bit Windows1 parent cfb9bea commit 1eec42e
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
0 commit comments