cannot_parse_undersized_slice
This commit is contained in:
parent
e57fe2de09
commit
f77d406983
@ -79,6 +79,14 @@ mod tests {
|
|||||||
assert_eq!(u64::parse_slice(&[]).unwrap_err(), IntParseError::Eof);
|
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]
|
#[test]
|
||||||
fn cannot_parse_oversized_slice() {
|
fn cannot_parse_oversized_slice() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
Loading…
Reference in New Issue
Block a user