Skip to content

Commit fd852f4

Browse files
authored
Rollup merge of #146487 - ferrocene:pvdrz/improve-num-coverage, r=joboet
Improve `core::num` coverage This PR improves the `core::num` coverage by adding a new test to `coretests`. r? libs
2 parents 185926c + afe8f81 commit fd852f4

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)