Skip to content

Commit

Permalink
test: update tests for flt2dec fallouts.
Browse files Browse the repository at this point in the history
  • Loading branch information
lifthrasiir committed May 6, 2015
1 parent f9bfda0 commit 85424c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/libserialize/json.rs
Expand Up @@ -3011,9 +3011,9 @@ mod tests {
let v: i64 = super::decode("9223372036854775807").unwrap();
assert_eq!(v, i64::MAX);

let res: DecodeResult<i64> = super::decode("765.25252");
let res: DecodeResult<i64> = super::decode("765.25");
assert_eq!(res, Err(ExpectedError("Integer".to_string(),
"765.25252".to_string())));
"765.25".to_string())));
}

#[test]
Expand Down
8 changes: 4 additions & 4 deletions src/test/run-pass/ifmt.rs
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.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");
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");

// Float edge cases
t!(format!("{}", -0.0), "0");
Expand Down

0 comments on commit 85424c4

Please sign in to comment.