Move f64::NAN ui tests into library

This commit is contained in:
chansuke 2020-10-27 09:29:57 +09:00
parent f2bbdd0a32
commit 5855fb7b79
2 changed files with 8 additions and 9 deletions

View File

@ -0,0 +1,8 @@
#[test]
fn test_nan() {
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);
}

View File

@ -1,9 +0,0 @@
// run-pass
pub fn main() {
use std::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);
}