Skip to content

Commit

Permalink
Add regression test for issue 1004
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 27, 2023
1 parent 02e5833 commit b0990a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/regression/issue1004.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#![cfg(feature = "arbitrary_precision")]

#[test]
fn test() {
let float = 5.55f32;
let value = serde_json::to_value(&float).unwrap();
let json = serde_json::to_string(&value).unwrap();
assert_eq!(json, "5.550000190734863"); // FIXME
}

0 comments on commit b0990a5

Please sign in to comment.