Skip to content

Commit

Permalink
Add test of Display for Number containing float
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 21, 2022
1 parent 6b8b073 commit de251c8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fn value_number() {
assert_eq!(format!("{:?}", json!(1)), "Number(1)");
assert_eq!(format!("{:?}", json!(-1)), "Number(-1)");
assert_eq!(format!("{:?}", json!(1.0)), "Number(1.0)");
assert_eq!(Number::from_f64(1.0).unwrap().to_string(), "1");
}

#[test]
Expand Down

0 comments on commit de251c8

Please sign in to comment.