diff options
| author | Ralf Jung <post@ralfj.de> | 2023-11-15 19:23:04 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-11-15 19:23:04 +0100 |
| commit | 1c1b7897d8dc7edc25bdbb0eabf082a5b65bb0bd (patch) | |
| tree | 1ce4fc852bfbe142a229595d9ca13d1beee0d9bb | |
| parent | d4559c01c2bdebad53c01f85064617ac61563a38 (diff) | |
| download | rust-1c1b7897d8dc7edc25bdbb0eabf082a5b65bb0bd.tar.gz rust-1c1b7897d8dc7edc25bdbb0eabf082a5b65bb0bd.zip | |
avoid exhaustive i16 test in Miri
| -rw-r--r-- | library/core/tests/fmt/num.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/core/tests/fmt/num.rs b/library/core/tests/fmt/num.rs index 1ddcd5ab795..bc387a46ea7 100644 --- a/library/core/tests/fmt/num.rs +++ b/library/core/tests/fmt/num.rs @@ -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}"), |
