Skip to content

Commit 5ffb90f

Browse files
EliahKaganLuaKT
authored andcommitted
Conditionally compile gix-revision at_symbol fuzzed test
This allows compilation to succeed when building tests on 32-bit Windows systems, and probably other 32-bit systems/builds. This test function had been set as ignored in 32-bit builds with the `cfg_attr` attribute. But it was still compiled, and the compilation failed on systems where the literal 9223372036854775808 is too big for `usize`. This was due to the implicit `#[deny(overflowing_literals)]`. While that could be conditionally suppressed for 32-bit builds, the test would not really be meaningful. So this leaves that diagnostic in place, and turns the conditional ignore into conditional compilation.
1 parent 81c4a82 commit 5ffb90f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gix-revision/tests/spec/parse/anchor/at_symbol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn braces_must_be_closed() {
1111
}
1212

1313
#[test]
14-
#[cfg_attr(target_pointer_width = "32", ignore = "Only works this way on 64 bit systems")]
14+
#[cfg(target_pointer_width = "64")] // Only works this way on 64-bit systems.
1515
fn fuzzed() {
1616
let rec = parse("@{-9223372036854775808}");
1717
assert_eq!(rec.nth_checked_out_branch, [Some(9223372036854775808), None]);

0 commit comments

Comments
 (0)