Skip to content

Commit 35367a0

Browse files
committed
test(allocator): fix test on 32 bit platforms
1 parent c1a48f0 commit 35367a0

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

crates/oxc_allocator/src/bump.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2606,11 +2606,19 @@ mod tests {
26062606
use super::*;
26072607

26082608
// Uses private type `ChunkFooter`.
2609+
#[cfg(target_pointer_width = "64")]
26092610
#[test]
2610-
fn chunk_footer_is_five_words() {
2611+
fn chunk_footer_is_six_words_on_64_bit() {
26112612
assert_eq!(mem::size_of::<ChunkFooter>(), mem::size_of::<usize>() * 6);
26122613
}
26132614

2615+
// Uses private type `ChunkFooter`.
2616+
#[cfg(target_pointer_width = "32")]
2617+
#[test]
2618+
fn chunk_footer_is_eight_words_on_32_bit() {
2619+
assert_eq!(mem::size_of::<ChunkFooter>(), mem::size_of::<usize>() * 8);
2620+
}
2621+
26142622
// Uses private `DEFAULT_CHUNK_SIZE_WITHOUT_FOOTER` and `FOOTER_SIZE`.
26152623
#[test]
26162624
fn allocated_bytes() {

0 commit comments

Comments
 (0)