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

Function li_original_bug_value

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

Source from the content-addressed store, hash-verified

1365}
1366main: () -> i32 {
1367 result: i32 = sum_nine(1, 2, 3, 4, 5, 6, 7, 8, 9)
1368 if result == 45 {
1369 return 0
1370 }
1371 return 1
1372}
1373"#,
1374 );
1375 assert!(
1376 matches!(outcome, RunOutcome::Halted(0)),
1377 "sum of 1..9 = 45 (9th arg via stack), got {outcome:?}"
1378 );
1379}
1380
1381/// Values held across a function call must be restored (callee-saved or spilled).
1382#[test]
1383fn call_callee_saves_preserved() {
1384 let (_, outcome, _) = run_hll(
1385 r#"
1386compute: (x: i32, y: i32) -> i32 {
1387 return x + y
1388}

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected