From 35367a08d124dec123202000b5e66225e4530eac Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Thu, 2 Apr 2026 17:42:24 +0100 Subject: [PATCH] test(allocator): fix test on 32 bit platforms --- crates/oxc_allocator/src/bump.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/oxc_allocator/src/bump.rs b/crates/oxc_allocator/src/bump.rs index 8b2c29f76049a..2f598533f028a 100644 --- a/crates/oxc_allocator/src/bump.rs +++ b/crates/oxc_allocator/src/bump.rs @@ -2606,11 +2606,19 @@ mod tests { use super::*; // Uses private type `ChunkFooter`. + #[cfg(target_pointer_width = "64")] #[test] - fn chunk_footer_is_five_words() { + fn chunk_footer_is_six_words_on_64_bit() { assert_eq!(mem::size_of::(), mem::size_of::() * 6); } + // Uses private type `ChunkFooter`. + #[cfg(target_pointer_width = "32")] + #[test] + fn chunk_footer_is_eight_words_on_32_bit() { + assert_eq!(mem::size_of::(), mem::size_of::() * 8); + } + // Uses private `DEFAULT_CHUNK_SIZE_WITHOUT_FOOTER` and `FOOTER_SIZE`. #[test] fn allocated_bytes() {