()
| 965 | matches!(outcome, StepOutcome::Halted(42)), |
| 966 | "expected Halted(42), got {outcome:?}" |
| 967 | ); |
| 968 | } |
| 969 | |
| 970 | #[test] |
| 971 | fn test_add_two_numbers() { |
| 972 | // 10 + 20 = 30 |
| 973 | let (_, outcome) = assemble_and_run(vec![ |
| 974 | ri(RealInstruction::Addi(Addi::new(11, 0, 10))), // a1 = 10 |
| 975 | ri(RealInstruction::Addi(Addi::new(12, 0, 20))), // a2 = 20 |
| 976 | ri(RealInstruction::Add(Add::new(10, 11, 12))), // a0 = a1 + a2 = 30 |
nothing calls this directly
no test coverage detected