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

Function struct_two_field_access

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

Source from the content-addressed store, hash-verified

1718 v: i32 = uninit
1719 if v == 0 {
1720 return 0
1721 }
1722 return 1
1723}
1724"#,
1725 );
1726 assert!(
1727 matches!(outcome, RunOutcome::Halted(0)),
1728 "BSS global must start at 0, got {outcome:?}"
1729 );
1730}
1731
1732/// Repeated writes accumulate correctly (global as a counter).
1733#[test]
1734fn global_i32_counter() {
1735 let (_, outcome, _) = run_hll(
1736 r#"
1737counter: i32 = 0
1738
1739bump: () -> void {
1740 counter = counter + 1
1741}
1742
1743main: () -> i32 {
1744 bump()
1745 bump()
1746 bump()
1747 v: i32 = counter

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected