diff --git a/tests/tests.rs b/tests/tests.rs index 7586292..c346b87 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -277,17 +277,17 @@ fn test_compact_size() { // 4 elements size + 1 len + 1 enum tag + [1 drop flag] type ByteArray = ArrayVec; println!("{}", mem::size_of::()); - assert!(mem::size_of::() <= 8); + assert!(mem::size_of::() <= 4 + mem::size_of::()); // just length type EmptyArray = ArrayVec; println!("{}", mem::size_of::()); assert!(mem::size_of::() <= mem::size_of::()); - // 12 element size + 1 enum tag + 3 padding + 1 len + 1 drop flag + 2 padding + // 3 elements + padding + length type QuadArray = ArrayVec; println!("{}", mem::size_of::()); - assert!(mem::size_of::() <= 24); + assert!(mem::size_of::() <= 4 * 4 + mem::size_of::()); } #[test]