summaryrefslogtreecommitdiffstats
path: root/library/core/tests/num/nan.rs
blob: ef81988c9612f8d952d920344ea98f018d3036c5 (plain)
1
2
3
4
5
6
7
#[test]
fn test_nan() {
    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);
}