()
| 956 | |
| 957 | #[test] |
| 958 | fn test_exit_code_42() { |
| 959 | let (_, outcome) = assemble_and_run(vec![ |
| 960 | ri(RealInstruction::Addi(Addi::new(10, 0, 42))), // a0 = 42 |
| 961 | ri(RealInstruction::Addi(Addi::new(17, 0, 93))), // a7 = 93 (exit) |
| 962 | ri(RealInstruction::Ecall(Ecall::new())), |
| 963 | ]); |
| 964 | assert!( |
| 965 | matches!(outcome, StepOutcome::Halted(42)), |
| 966 | "expected Halted(42), got {outcome:?}" |
| 967 | ); |
nothing calls this directly
no test coverage detected