From f77d406983532cd1fde79ac9e07edd777c4484c0 Mon Sep 17 00:00:00 2001 From: timofey Date: Fri, 4 Aug 2023 23:39:28 +0000 Subject: [PATCH] `cannot_parse_undersized_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 d6222c0..c7bf6f6 100644 --- a/src/rstd/atomic/au64.rs +++ b/src/rstd/atomic/au64.rs @@ -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!(