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

Function global_i32_write_read

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

Source from the content-addressed store, hash-verified

1434fn call_return_value_used_in_expr() {
1435 let (_, outcome, _) = run_hll(
1436 r#"
1437double: (n: i32) -> i32 {
1438 return n * 2
1439}
1440main: () -> i32 {
1441 result: i32 = double(21)
1442 check: i32 = result - 42
1443 if check == 0 {
1444 return 0
1445 }
1446 return 1
1447}
1448"#,
1449 );
1450 assert!(
1451 matches!(outcome, RunOutcome::Halted(0)),
1452 "double(21) = 42, used in expression, got {outcome:?}"
1453 );
1454}
1455
1456// --- emit_li constant materialization (merged from emit_li_execution.rs) ---
1457// Expected values are built from safe (<= 2047) operands so the comparison
1458// target is not affected by the same bug under test.

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected