Use a test value that doesn't depend on the handling of even/odd rounding

This commit is contained in:
Josh Triplett 2021-10-03 20:15:12 -07:00 committed by GitHub
parent e3996ffcb6
commit 199b33f0d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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");