Skip to content

Commit afe8f81

Browse files
committed
Improve core::num coverage
1 parent a171994 commit afe8f81

File tree

1 file changed

+7
-0
lines changed
  • library/coretests/tests/num

1 file changed

+7
-0
lines changed

library/coretests/tests/num/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ fn from_str_issue7588() {
111111
assert_eq!(s, None);
112112
}
113113

114+
#[test]
115+
#[should_panic = "radix must lie in the range `[2, 36]`"]
116+
fn from_ascii_radix_panic() {
117+
let radix = 1;
118+
let _parsed = u64::from_str_radix("12345ABCD", radix);
119+
}
120+
114121
#[test]
115122
fn test_int_from_str_overflow() {
116123
test_parse::<i8>("127", Ok(127));

0 commit comments

Comments
 (0)