9 lines
212 B
Rust
Raw Normal View History

2020-10-27 09:29:57 +09:00
#[test]
fn test_nan() {
2020-11-05 08:40:04 +09:00
use core::f64;
let x = "NaN".to_string();
assert_eq!(format!("{}", f64::NAN), x);
assert_eq!(format!("{:e}", f64::NAN), x);
assert_eq!(format!("{:E}", f64::NAN), x);
2020-10-27 09:29:57 +09:00
}