test: fixed some tests affected by banker's rounding.

This commit is contained in:
Kang Seonghoon 2015-05-09 22:52:47 +09:00
parent 3d34e177dd
commit 1aecd17463

View File

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