diff --git a/ykrt/src/compile/jitc_yk/jit_ir.rs b/ykrt/src/compile/jitc_yk/jit_ir.rs index b1a5427de..771386bc2 100644 --- a/ykrt/src/compile/jitc_yk/jit_ir.rs +++ b/ykrt/src/compile/jitc_yk/jit_ir.rs @@ -428,13 +428,16 @@ mod tests { #[test] fn does_fit_short_operand() { for i in 0..SHORT_OPERAND_VALUE_SIZE { - Operand::new(OpKind::Local, 1 << i); + matches!(Operand::new(OpKind::Local, 1 << i), Operand::Short(_)); } } #[test] - #[should_panic] + #[should_panic] // Once long operands are implemented, remove. fn doesnt_fit_short_operand() { - Operand::new(OpKind::Local, 1 << SHORT_OPERAND_VALUE_SIZE); + matches!( + Operand::new(OpKind::Local, 1 << SHORT_OPERAND_VALUE_SIZE), + Operand::Long(_) + ); } }