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

Function li_true_64bit_small

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

Source from the content-addressed store, hash-verified

1410 let (_, outcome, _) = run_hll(
1411 r#"
1412divide: (a: i32, b: i32) -> { quotient: i32, remainder: i32 } {
1413 return { .quotient = a / b, .remainder = a % b }
1414}
1415main: () -> i32 {
1416 { quotient: i32, remainder: i32 } = divide(17, 5)
1417 if quotient == 3 {
1418 if remainder == 2 {
1419 return 0
1420 }
1421 }
1422 return 1
1423}
1424"#,
1425 );
1426 assert!(
1427 matches!(outcome, RunOutcome::Halted(0)),
1428 "17 / 5 = 3 remainder 2 (struct return), got {outcome:?}"
1429 );
1430}
1431
1432/// Return value must be usable in a subsequent expression.
1433#[test]

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected