diff options
| author | chansuke <chansuke@georepublic.de> | 2020-10-27 09:29:57 +0900 |
|---|---|---|
| committer | chansuke <chansuke@georepublic.de> | 2020-11-05 08:32:07 +0900 |
| commit | 5855fb7b79d755b49152a334d18fa6b1efae7bf4 (patch) | |
| tree | ee439946326dbd449c694d19a25dfc0179637759 | |
| parent | f2bbdd0a3257cc980c934a92c5bf9808cf31728c (diff) | |
| download | rust-5855fb7b79d755b49152a334d18fa6b1efae7bf4.tar.gz rust-5855fb7b79d755b49152a334d18fa6b1efae7bf4.zip | |
Move f64::NAN ui tests into `library`
| -rw-r--r-- | library/core/tests/num/nan.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/format-nan.rs | 9 |
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); -} |
