This commit is contained in:
parent
40a1975e84
commit
e57fe2de09
@ -78,4 +78,12 @@ mod tests {
|
|||||||
fn cannot_parse_empty_slice() {
|
fn cannot_parse_empty_slice() {
|
||||||
assert_eq!(u64::parse_slice(&[]).unwrap_err(), IntParseError::Eof);
|
assert_eq!(u64::parse_slice(&[]).unwrap_err(), IntParseError::Eof);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn cannot_parse_oversized_slice() {
|
||||||
|
assert_eq!(
|
||||||
|
u64::parse_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0]).unwrap_err(),
|
||||||
|
IntParseError::ExtraData(1),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user