test(lexer): assert size of Token in 32-bit WASM (#8292)

`Token` should be 16 bytes in WASM too. Enable this test on 32-bit platforms.
This commit is contained in:
overlookmotel 2025-01-07 06:58:23 +00:00
parent 0344e98c99
commit 16dcdaf6cd

View file

@ -39,11 +39,6 @@ pub struct Token {
_padding2: u32,
}
#[cfg(all(test, target_pointer_width = "64"))]
mod size_asserts {
const _: () = assert!(std::mem::size_of::<super::Token>() == 16);
}
impl Token {
pub(super) fn new_on_new_line() -> Self {
Self { is_on_new_line: true, ..Self::default() }
@ -68,3 +63,9 @@ impl Token {
self.has_separator = true;
}
}
#[cfg(test)]
mod size_asserts {
use super::Token;
const _: () = assert!(std::mem::size_of::<Token>() == 16);
}