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

Function ir_index_with_stride

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

Source from the content-addressed store, hash-verified

2020 if vq == 200 {
2021 return 0
2022 }
2023 }
2024 return 1
2025}
2026"#,
2027 );
2028 assert!(
2029 matches!(outcome, RunOutcome::Halted(0)),
2030 "two heap i32 slots must be independent (p=100, q=200), got {outcome:?}"
2031 );
2032}
2033
2034/// Three-field struct: middle field is at the correct byte offset.
2035#[test]
2036fn struct_three_field_middle_offset() {
2037 let (_, outcome, _) = run_hll(
2038 r#"
2039struct Triple { a: i32, b: i32, c: i32 }
2040
2041make: (x: i32, y: i32, z: i32) -> Triple {
2042 return { .a = x, .b = y, .c = z }
2043}
2044
2045main: () -> i32 {
2046 t: Triple = make(1, 99, 3)
2047 if t.b == 99 {
2048 return 0
2049 }

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected