diff options
| author | Christian Poveda <christian.poveda@ferrous-systems.com> | 2025-09-12 14:35:20 -0500 |
|---|---|---|
| committer | Christian Poveda <christian.poveda@ferrous-systems.com> | 2025-09-12 14:35:20 -0500 |
| commit | afe8f81c73244bcc33be39c9ea0f90f090ac14ce (patch) | |
| tree | 6fd2f9b656b977c935cc61b412f76a912c48d795 /library | |
| parent | a171994070dc18c3a32fc1aa2d98cf03ae96b63e (diff) | |
| download | rust-afe8f81c73244bcc33be39c9ea0f90f090ac14ce.tar.gz rust-afe8f81c73244bcc33be39c9ea0f90f090ac14ce.zip | |
Improve `core::num` coverage
Diffstat (limited to 'library')
| -rw-r--r-- | library/coretests/tests/num/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/coretests/tests/num/mod.rs b/library/coretests/tests/num/mod.rs index 54e54f734f6..913f766ec16 100644 --- a/library/coretests/tests/num/mod.rs +++ b/library/coretests/tests/num/mod.rs @@ -112,6 +112,13 @@ fn from_str_issue7588() { } #[test] +#[should_panic = "radix must lie in the range `[2, 36]`"] +fn from_ascii_radix_panic() { + let radix = 1; + let _parsed = u64::from_str_radix("12345ABCD", radix); +} + +#[test] fn test_int_from_str_overflow() { test_parse::<i8>("127", Ok(127)); test_parse::<i8>("128", Err(IntErrorKind::PosOverflow)); |
