From 722905fda0bc7ef818bccc4b3f59641533269f36 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sat, 12 Dec 2015 08:13:43 -0500 Subject: restore tests accidentally removed in #30182 --- src/libcoretest/num/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libcoretest/num') 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 @@ -54,6 +54,14 @@ mod tests { use core::option::Option::{Some, None}; use core::num::Float; + #[test] + fn from_str_issue7588() { + let u : Option = u8::from_str_radix("1000", 10).ok(); + assert_eq!(u, None); + let s : Option = i16::from_str_radix("80000", 10).ok(); + assert_eq!(s, None); + } + #[test] fn test_int_from_str_overflow() { let mut i8_val: i8 = 127; -- cgit 1.4.1-3-g733a5