From e57fe2de098dc3c783f4371f657e0285af8929b0 Mon Sep 17 00:00:00 2001 From: timofey Date: Fri, 4 Aug 2023 23:37:45 +0000 Subject: [PATCH] `cannot_parse_oversized_slice` --- src/rstd/atomic/au64.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rstd/atomic/au64.rs b/src/rstd/atomic/au64.rs index f7955dc..d6222c0 100644 --- a/src/rstd/atomic/au64.rs +++ b/src/rstd/atomic/au64.rs @@ -78,4 +78,12 @@ mod tests { fn cannot_parse_empty_slice() { 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), + ); + } }