about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/tests/num/nan.rs8
-rw-r--r--src/test/ui/format-nan.rs9
2 files changed, 8 insertions, 9 deletions
diff --git a/library/core/tests/num/nan.rs b/library/core/tests/num/nan.rs
new file mode 100644
index 00000000000..6d64f93cfa4
--- /dev/null
+++ b/library/core/tests/num/nan.rs
@@ -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);
+}
diff --git a/src/test/ui/format-nan.rs b/src/test/ui/format-nan.rs
deleted file mode 100644
index e4a134fa2fb..00000000000
--- a/src/test/ui/format-nan.rs
+++ /dev/null
@@ -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);
-}