We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 19bd924 + 85b1fad commit 014e4acCopy full SHA for 014e4ac
core/tests/num/mod.rs
@@ -27,6 +27,8 @@ mod bignum;
27
mod dec2flt;
28
mod flt2dec;
29
30
+mod nan;
31
+
32
/// Adds the attribute to all items in the block.
33
macro_rules! cfg_block {
34
($(#[$attr:meta]{$($it:item)*})*) => {$($(
core/tests/num/nan.rs
@@ -0,0 +1,8 @@
1
+#[test]
2
+fn test_nan() {
3
+ use core::f64;
4
+ let x = "NaN".to_string();
5
+ assert_eq!(format!("{}", f64::NAN), x);
6
+ assert_eq!(format!("{:e}", f64::NAN), x);
7
+ assert_eq!(format!("{:E}", f64::NAN), x);
8
+}
0 commit comments