about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorRobin Kruppe <robin.kruppe@gmail.com>2016-02-04 13:51:18 +0100
committerRobin Kruppe <robin.kruppe@gmail.com>2016-02-04 16:28:07 +0100
commitcc68f2c6bfeece790748474f0b1e232079212942 (patch)
treeea205636bbd15f11ce3c3caeaa9e9c56b9b68dfb /src/libcoretest
parentaf5d574d1f56ec07bb5495ca212323b11739f111 (diff)
downloadrust-cc68f2c6bfeece790748474f0b1e232079212942.tar.gz
rust-cc68f2c6bfeece790748474f0b1e232079212942.zip
Enable unit tests for literals that overflow. I have no idea why this condition was ever added.
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/num/dec2flt/mod.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/libcoretest/num/dec2flt/mod.rs b/src/libcoretest/num/dec2flt/mod.rs
index a96c2957568..fe6f52406fb 100644
--- a/src/libcoretest/num/dec2flt/mod.rs
+++ b/src/libcoretest/num/dec2flt/mod.rs
@@ -25,13 +25,11 @@ macro_rules! test_literal {
         let x64: f64 = $x;
         let inputs = &[stringify!($x).into(), format!("{:?}", x64), format!("{:e}", x64)];
         for input in inputs {
-            if input != "inf" {
-                assert_eq!(input.parse(), Ok(x64));
-                assert_eq!(input.parse(), Ok(x32));
-                let neg_input = &format!("-{}", input);
-                assert_eq!(neg_input.parse(), Ok(-x64));
-                assert_eq!(neg_input.parse(), Ok(-x32));
-            }
+            assert_eq!(input.parse(), Ok(x64));
+            assert_eq!(input.parse(), Ok(x32));
+            let neg_input = &format!("-{}", input);
+            assert_eq!(neg_input.parse(), Ok(-x64));
+            assert_eq!(neg_input.parse(), Ok(-x32));
         }
     })
 }