From dc3fceef1468430a320e4cde8957603d16965aa6 Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 26 Oct 2019 16:11:49 -0700 Subject: [PATCH] test large arrays in wrong pkt test --- src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 15b4ef4..4cfcc9a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -287,18 +287,17 @@ mod test { struct Test { a: u32, b: u16, - c: u16, + #[nodebug] + c: [u8; 0x2000], } let test = Test { a: 123456789, b: 54321, - c: 9999, + c: [0; 0x2000], }; let mut bytes = test.as_bytes(); - assert!(bytes == vec![16, 0, 35, 0, 0, 0, 0, 0, 21, 205, 91, 7, 49, 212, 15, 39]); - bytes[2] = 17; let test2 = Test::from_bytes(&bytes); assert!(test2 == Err(PacketParseError::WrongPacketCommand));