Add regression test for issue 1004

This commit is contained in:
David Tolnay 2023-03-27 09:37:10 -07:00
parent 02e583360d
commit b0990a51db
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -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
}