Skip to content

Commit

Permalink
test: fixed some tests affected by banker's rounding.
Browse files Browse the repository at this point in the history
  • Loading branch information
lifthrasiir committed May 9, 2015
1 parent 3d34e17 commit 1aecd17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/run-pass/ifmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 1aecd17

Please sign in to comment.