mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
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:
parent
0344e98c99
commit
16dcdaf6cd
1 changed files with 6 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue