diff options
Diffstat (limited to 'third_party/rust/ron/tests/large_number.rs')
-rw-r--r-- | third_party/rust/ron/tests/large_number.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/third_party/rust/ron/tests/large_number.rs b/third_party/rust/ron/tests/large_number.rs new file mode 100644 index 0000000000..4e8b5e4b47 --- /dev/null +++ b/third_party/rust/ron/tests/large_number.rs @@ -0,0 +1,14 @@ +use ron::value::Number; + +#[test] +fn test_large_number() { + use ron::value::Value; + let test_var = Value::Number(Number::new(10000000000000000000000.0f64)); + let test_ser = ron::ser::to_string(&test_var).unwrap(); + let test_deser = ron::de::from_str::<Value>(&test_ser); + + assert_eq!( + test_deser.unwrap(), + Value::Number(Number::new(10000000000000000000000.0)) + ); +} |