interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / serde_json / tests / regression / issue1004.rs

12 lines · 362 bytes Raw Blame History
1#![cfg(feature = "arbitrary_precision")]
2
3#[test]
4fn test() {
5 let float = 5.55f32;
6 let value = serde_json::to_value(float).unwrap();
7 let json = serde_json::to_string(&value).unwrap();
8
9 // If the f32 were cast to f64 by Value before serialization, then this
10 // would incorrectly serialize as 5.550000190734863.
11 assert_eq!(json, "5.55");
12}