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

Function test_branch_loop

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

Source from the content-addressed store, hash-verified

809#[test]
810fn hll_function_call_and_return() {
811 let (_, outcome, _) = run_hll(
812 r#"
813add: (a: i32, b: i32) -> i32 {
814 return a + b
815}
816main: () -> i32 {
817 return add(10, 32)
818}
819"#,
820 );
821 assert!(
822 matches!(outcome, StepOutcome::Halted(42)),
823 "expected Halted(42), got {outcome:?}"
824 );
825}
826
827#[test]
828fn hll_putchar_output() {
829 let (_, outcome, uart) = run_hll(
830 r#"
831console := import("console")
832
833main: () -> i32 {
834 console.putchar(65)
835 console.putchar(66)
836 console.putchar(67)

Callers

nothing calls this directly

Calls 1

assemble_and_runFunction · 0.85

Tested by

no test coverage detected