Skip to content

Commit

Permalink
Rollup merge of rust-lang#78425 - chansuke:move_nan, r=jyn514
Browse files Browse the repository at this point in the history
Move f64::NAN ui tests into `library`

This is a partial fix of rust-lang#76268.

r? ```@matklad```
  • Loading branch information
m-ou-se authored Nov 5, 2020
2 parents 10d2843 + f9b139f commit 9922933
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions library/core/tests/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)*})*) => {$($(
Expand Down
7 changes: 3 additions & 4 deletions src/test/ui/format-nan.rs → library/core/tests/num/nan.rs
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit 9922933

Please sign in to comment.