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

Function test_div_by_zero

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

Source from the content-addressed store, hash-verified

902 let user_obj = pipeline
903 .assemble(&user_tokens)
904 .expect("user assemble failed");
905 let assembled = pipeline
906 .link_assembled_objects(&link_with_stdlib(&user_obj))
907 .expect("link failed");
908
909 let mut vm = VirtualMachine::new(&assembled);
910 // Queue: A press, B release (filtered), C press -> guest echoes "AC".
911 vm.keyboard_push(b'A' as u16, true);
912 vm.keyboard_push(b'B' as u16, false);
913 vm.keyboard_push(b'C' as u16, true);
914
915 let run = vm.run(5_000_000);
916 assert_eq!(
917 run.uart_output, "AC",
918 "expected 'AC', got {:?}",
919 run.uart_output
920 );
921 assert!(
922 matches!(run.outcome, StepOutcome::Halted(0)),
923 "expected Halted(0), got {:?}",
924 run.outcome
925 );
926}
927

Callers

nothing calls this directly

Calls 1

assemble_and_runFunction · 0.85

Tested by

no test coverage detected