We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
library
1 parent f2bbdd0 commit 5855fb7Copy full SHA for 5855fb7
library/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
+}
src/test/ui/format-nan.rs
0 commit comments