diff options
| author | Tamir Duberstein <tamird@gmail.com> | 2015-12-12 08:13:43 -0500 |
|---|---|---|
| committer | Tamir Duberstein <tamird@gmail.com> | 2015-12-13 01:02:12 -0500 |
| commit | 722905fda0bc7ef818bccc4b3f59641533269f36 (patch) | |
| tree | 005b082f036dad639468036bcce3932c5a086239 /src/libcoretest | |
| parent | 35b6461b6e7419ef5b81d02dfe53172219103764 (diff) | |
restore tests accidentally removed in #30182
Diffstat (limited to 'src/libcoretest')
| -rw-r--r-- | src/libcoretest/num/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcoretest/num/mod.rs b/src/libcoretest/num/mod.rs index 09f2e326503..fba56db32bb 100644 --- a/src/libcoretest/num/mod.rs +++ b/src/libcoretest/num/mod.rs @@ -55,6 +55,14 @@ 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); + } + + #[test] fn test_int_from_str_overflow() { let mut i8_val: i8 = 127; assert_eq!("127".parse::<i8>().ok(), Some(i8_val)); |
