Skip to content

Commit 218cec6

Browse files
authored
ZJIT: Add regression tests for important type sizes (ruby#17560)
We want to make sure these don't get any bigger and also ratchet down if we shrink them.
1 parent 69eb398 commit 218cec6

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

zjit/src/hir/tests.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
#[cfg(test)]
22
use super::*;
33

4+
#[cfg(test)]
5+
mod size_tests {
6+
use super::*;
7+
8+
#[test]
9+
fn test_size_of_insn() {
10+
assert_eq!(std::mem::size_of::<Insn>(), 120);
11+
}
12+
13+
#[test]
14+
fn test_size_of_type() {
15+
assert_eq!(std::mem::size_of::<Type>(), 24);
16+
}
17+
}
18+
419
#[cfg(test)]
520
mod snapshot_tests {
621
use super::*;

0 commit comments

Comments
 (0)