Skip to content

Commit cc68f2c

Browse files
author
Robin Kruppe
committed
Enable unit tests for literals that overflow. I have no idea why this condition was ever added.
1 parent af5d574 commit cc68f2c

File tree

1 file changed

+5
-7
lines changed
  • src/libcoretest/num/dec2flt

1 file changed

+5
-7
lines changed

src/libcoretest/num/dec2flt/mod.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ macro_rules! test_literal {
2525
let x64: f64 = $x;
2626
let inputs = &[stringify!($x).into(), format!("{:?}", x64), format!("{:e}", x64)];
2727
for input in inputs {
28-
if input != "inf" {
29-
assert_eq!(input.parse(), Ok(x64));
30-
assert_eq!(input.parse(), Ok(x32));
31-
let neg_input = &format!("-{}", input);
32-
assert_eq!(neg_input.parse(), Ok(-x64));
33-
assert_eq!(neg_input.parse(), Ok(-x32));
34-
}
28+
assert_eq!(input.parse(), Ok(x64));
29+
assert_eq!(input.parse(), Ok(x32));
30+
let neg_input = &format!("-{}", input);
31+
assert_eq!(neg_input.parse(), Ok(-x64));
32+
assert_eq!(neg_input.parse(), Ok(-x32));
3533
}
3634
})
3735
}

0 commit comments

Comments
 (0)