2025-08-26 05:49:23 +09:00
|
|
|
use nyash_rust::mir::instruction_introspection;
|
|
|
|
|
|
2025-09-10 20:56:14 +09:00
|
|
|
// MIR14: ensure instruction roster remains stable
|
2025-08-26 05:49:23 +09:00
|
|
|
#[test]
|
2025-09-10 20:56:14 +09:00
|
|
|
fn mir14_shape_is_fixed() {
|
2025-09-10 17:23:26 +09:00
|
|
|
let impl_names = instruction_introspection::mir14_instruction_names();
|
2025-09-16 23:49:36 +09:00
|
|
|
assert_eq!(
|
|
|
|
|
impl_names.len(),
|
|
|
|
|
14,
|
|
|
|
|
"MIR14 must contain exactly 14 instructions"
|
|
|
|
|
);
|
|
|
|
|
assert!(
|
|
|
|
|
impl_names.contains(&"UnaryOp"),
|
|
|
|
|
"MIR14 must include UnaryOp"
|
|
|
|
|
);
|
2025-08-26 05:49:23 +09:00
|
|
|
}
|