]> git.lizzy.rs Git - rust.git/blob - library/core/tests/num/nan.rs
Rollup merge of #106823 - m-ou-se:format-args-as-str-guarantees, r=dtolnay
[rust.git] / library / core / tests / num / nan.rs
1 #[test]
2 fn test_nan() {
3     let x = "NaN".to_string();
4     assert_eq!(format!("{}", f64::NAN), x);
5     assert_eq!(format!("{:e}", f64::NAN), x);
6     assert_eq!(format!("{:E}", f64::NAN), x);
7 }