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

Function li_max_unsigned_32bit

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

Source from the content-addressed store, hash-verified

1387 return x + y
1388}
1389main: () -> i32 {
1390 preserved: i32 = 100
1391 inner_result: i32 = compute(3, 4)
1392 if preserved == 100 {
1393 if inner_result == 7 {
1394 return 0
1395 }
1396 }
1397 return 1
1398}
1399"#,
1400 );
1401 assert!(
1402 matches!(outcome, RunOutcome::Halted(0)),
1403 "value alive across call must be preserved; inner result must be 7, got {outcome:?}"
1404 );
1405}
1406
1407/// Two-field struct returned inline (a0/a1 small-struct ABI).
1408#[test]
1409fn call_struct_return_two_fields() {
1410 let (_, outcome, _) = run_hll(
1411 r#"

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected