Skip to content

Commit 5c2d615

Browse files
test size_of_sha1 reports wrong size on i386
1 parent f09ea13 commit 5c2d615

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gix-features/tests/hash.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ fn size_of_sha1() {
66
assert_eq!(std::mem::size_of::<Sha1>(), 96)
77
}
88

9-
#[cfg(feature = "fast-sha1")]
9+
#[cfg(all(feature = "fast-sha1", target_arch = "x86"))]
10+
#[test]
11+
fn size_of_sha1() {
12+
assert_eq!(std::mem::size_of::<Sha1>(), 96)
13+
}
14+
15+
#[cfg(all(feature = "fast-sha1", not(target_arch = "x86")))]
1016
#[test]
1117
fn size_of_sha1() {
1218
assert_eq!(std::mem::size_of::<Sha1>(), 104)

0 commit comments

Comments
 (0)