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

Function ir_cmp_unsigned_max

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

Source from the content-addressed store, hash-verified

1957 sum: i32 = quotient + remainder
1958 if sum == 5 {
1959 return 0
1960 }
1961 return 1
1962}
1963"#,
1964 );
1965 assert!(
1966 matches!(outcome, RunOutcome::Halted(0)),
1967 "23 / 7 = 3 remainder 2; quotient + remainder = 5, got {outcome:?}"
1968 );
1969}
1970
1971/// Struct returned from one call fed into another.
1972#[test]
1973fn struct_return_chained() {
1974 let (_, outcome, _) = run_hll(
1975 r#"
1976minmax: (a: i32, b: i32) -> { lo: i32, hi: i32 } {
1977 if a < b {
1978 return { .lo = a, .hi = b }
1979 }

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected