cannot_parse_undersized_slice

This commit is contained in:
AF 2023-08-04 23:39:28 +00:00
parent e57fe2de09
commit f77d406983

View File

@ -79,6 +79,14 @@ mod tests {
assert_eq!(u64::parse_slice(&[]).unwrap_err(), IntParseError::Eof);
}
#[test]
fn cannot_parse_undersized_slice() {
assert_eq!(
u64::parse_slice(&[0, 0, 0, 0, 0, 0, 0]).unwrap_err(),
IntParseError::Eof,
);
}
#[test]
fn cannot_parse_oversized_slice() {
assert_eq!(