Skip to content

Commit

Permalink
avoid exhaustive i16 test in Miri
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 15, 2023
1 parent d4559c0 commit 1c1b789
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions library/core/tests/fmt/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ fn test_format_int_exp_precision() {
assert_eq!(format!("{:+10.3e}", 1), " +1.000e0");

// test precision remains correct when rounding to next power

for i in i16::MIN..=i16::MAX {
#[cfg(miri)] // can't cover all of `i16` in Miri
let range = [i16::MIN, -1, 1, i16::MAX];
#[cfg(not(miri))]
let range = i16::MIN..=i16::MAX;
for i in range {
for p in 0..=5 {
assert_eq!(
format!("{i:.p$e}"),
Expand Down

0 comments on commit 1c1b789

Please sign in to comment.