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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
193 B
Rust
Raw Normal View History

2020-10-27 08:29:57 +08:00
#[test]
fn test_nan() {
2020-11-05 07:40:04 +08: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-27 08:29:57 +08:00
}