Rollup merge of #78425 - chansuke:move_nan, r=jyn514

Move f64::NAN ui tests into `library`

This is a partial fix of #76268.

r? ```@matklad```
This commit is contained in:
Mara Bos 2020-11-05 10:29:40 +01:00 committed by GitHub
commit 99229337a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -27,6 +27,8 @@ mod bignum;
mod dec2flt;
mod flt2dec;
mod nan;
/// Adds the attribute to all items in the block.
macro_rules! cfg_block {
($(#[$attr:meta]{$($it:item)*})*) => {$($(

View File

@ -1,7 +1,6 @@
// run-pass
pub fn main() {
use std::f64;
#[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);