diff options
| author | Kang Seonghoon <public+git@mearie.org> | 2015-05-09 22:52:47 +0900 |
|---|---|---|
| committer | Kang Seonghoon <public+git@mearie.org> | 2015-05-09 22:52:47 +0900 |
| commit | 1aecd17463bb16d03462cf31edb920b9f47ddf2c (patch) | |
| tree | b82c5eb44fb181950dc2fabc3ff1a17467369b4f /src | |
| parent | 3d34e177dd19bfbc6885b03eac0632adc9c621b2 (diff) | |
| download | rust-1aecd17463bb16d03462cf31edb920b9f47ddf2c.tar.gz rust-1aecd17463bb16d03462cf31edb920b9f47ddf2c.zip | |
test: fixed some tests affected by banker's rounding.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/run-pass/ifmt.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs index 01a38b374cc..240b6286c8c 100644 --- a/src/test/run-pass/ifmt.rs +++ b/src/test/run-pass/ifmt.rs @@ -138,10 +138,10 @@ pub fn main() { t!(format!("{:e}", 1.2345e6f32), "1.2345e6"); t!(format!("{:e}", 1.2345e6f64), "1.2345e6"); t!(format!("{:E}", 1.2345e6f64), "1.2345E6"); - t!(format!("{:.3e}", 1.2345e6f64), "1.235e6"); - t!(format!("{:10.3e}", 1.2345e6f64), " 1.235e6"); - t!(format!("{:+10.3e}", 1.2345e6f64), " +1.235e6"); - t!(format!("{:+10.3e}", -1.2345e6f64), " -1.235e6"); + t!(format!("{:.3e}", 1.2345e6f64), "1.234e6"); + t!(format!("{:10.3e}", 1.2345e6f64), " 1.234e6"); + t!(format!("{:+10.3e}", 1.2345e6f64), " +1.234e6"); + t!(format!("{:+10.3e}", -1.2345e6f64), " -1.234e6"); // Float edge cases t!(format!("{}", -0.0), "0"); |
