MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / qemu_02_control_flow

Function qemu_02_control_flow

tests/integration/vm_execution.rs:958–964  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

956
957#[test]
958fn 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 );

Callers

nothing calls this directly

Calls 1

run_hll_fileFunction · 0.85

Tested by

no test coverage detected