diff options
| author | Robin Kruppe <robin.kruppe@gmail.com> | 2016-02-04 13:51:18 +0100 |
|---|---|---|
| committer | Robin Kruppe <robin.kruppe@gmail.com> | 2016-02-04 16:28:07 +0100 |
| commit | cc68f2c6bfeece790748474f0b1e232079212942 (patch) | |
| tree | ea205636bbd15f11ce3c3caeaa9e9c56b9b68dfb /src/libcoretest | |
| parent | af5d574d1f56ec07bb5495ca212323b11739f111 (diff) | |
| download | rust-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.rs | 12 |
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)); } }) } |
