diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2021-10-03 20:15:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-03 20:15:12 -0700 |
| commit | 199b33f0d77c3fae1c2c982029df7168899f8aba (patch) | |
| tree | 1126172f00312366ccc014a0b46a56bd52b5cc77 | |
| parent | e3996ffcb6bcb72d1c364ff19131fe60a9c77b9b (diff) | |
| download | rust-199b33f0d77c3fae1c2c982029df7168899f8aba.tar.gz rust-199b33f0d77c3fae1c2c982029df7168899f8aba.zip | |
Use a test value that doesn't depend on the handling of even/odd rounding
| -rw-r--r-- | library/core/tests/fmt/num.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/tests/fmt/num.rs b/library/core/tests/fmt/num.rs index 41eaf5a4878..b958422d14f 100644 --- a/library/core/tests/fmt/num.rs +++ b/library/core/tests/fmt/num.rs @@ -146,7 +146,7 @@ fn test_format_int_exp_precision() { assert_eq!(format!("{:.1000e}", 1), format!("1.{}e0", "0".repeat(1000))); //test zero precision assert_eq!(format!("{:.0e}", 1), format!("1e0",)); - assert_eq!(format!("{:.0e}", 25), format!("3e1",)); + assert_eq!(format!("{:.0e}", 35), format!("4e1",)); //test padding with precision (and sign) assert_eq!(format!("{:+10.3e}", 1), " +1.000e0"); |
