Enable unit tests for literals that overflow. I have no idea why this condition was ever added.
This commit is contained in:
parent
af5d574d1f
commit
cc68f2c6bf
1 changed files with 5 additions and 7 deletions
|
@ -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));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue