From 27f7f58f8389d9f56f1199108a96625dac7ff7d4 Mon Sep 17 00:00:00 2001 From: bluss Date: Tue, 23 Mar 2021 17:55:46 +0100 Subject: [PATCH] TEST: Fix size check test again --- tests/tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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]