rust/library/core/tests/num/nan.rs

8 lines
193 B
Rust
Raw Normal View History

2020-10-26 19:29:57 -05:00
#[test]
fn test_nan() {
2020-11-04 17:40:04 -06:00
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-26 19:29:57 -05:00
}