Assemble instructions, run in VM, return the VM (for peeking) and the outcome.
(insns: Vec<RvInstruction>)
| 723 | } |
| 724 | "#, |
| 725 | ); |
| 726 | // a[0]=5*4=20, a[1]=0+7=7 -> 27. |
| 727 | assert!( |
| 728 | matches!(outcome, StepOutcome::Halted(27)), |
| 729 | "expected Halted(27), got {outcome:?}" |
| 730 | ); |
| 731 | } |
| 732 | |
| 733 | #[test] |