diff options
Diffstat (limited to 'src/libcoretest/num/mod.rs')
| -rw-r--r-- | src/libcoretest/num/mod.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/libcoretest/num/mod.rs b/src/libcoretest/num/mod.rs index 738761f3911..09f2e326503 100644 --- a/src/libcoretest/num/mod.rs +++ b/src/libcoretest/num/mod.rs @@ -55,35 +55,6 @@ mod tests { use core::num::Float; #[test] - fn from_str_issue7588() { - let u : Option<u8> = u8::from_str_radix("1000", 10).ok(); - assert_eq!(u, None); - let s : Option<i16> = i16::from_str_radix("80000", 10).ok(); - assert_eq!(s, None); - let s = "10000000000000000000000000000000000000000"; - let f : Option<f32> = f32::from_str_radix(s, 10).ok(); - assert_eq!(f, Some(Float::infinity())); - let fe : Option<f32> = f32::from_str_radix("1e40", 10).ok(); - assert_eq!(fe, Some(Float::infinity())); - } - - #[test] - fn test_from_str_radix_float() { - let x1 : Option<f64> = f64::from_str_radix("-123.456", 10).ok(); - assert_eq!(x1, Some(-123.456)); - let x2 : Option<f32> = f32::from_str_radix("123.456", 10).ok(); - assert_eq!(x2, Some(123.456)); - let x3 : Option<f32> = f32::from_str_radix("-0.0", 10).ok(); - assert_eq!(x3, Some(-0.0)); - let x4 : Option<f32> = f32::from_str_radix("0.0", 10).ok(); - assert_eq!(x4, Some(0.0)); - let x4 : Option<f32> = f32::from_str_radix("1.0", 10).ok(); - assert_eq!(x4, Some(1.0)); - let x5 : Option<f32> = f32::from_str_radix("-1.0", 10).ok(); - assert_eq!(x5, Some(-1.0)); - } - - #[test] fn test_int_from_str_overflow() { let mut i8_val: i8 = 127; assert_eq!("127".parse::<i8>().ok(), Some(i8_val)); |
