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

Function mem_i16_store_load

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

Source from the content-addressed store, hash-verified

1613 let (_, outcome, _) = run_hll(
1614 r#"
1615main: () -> i32 {
1616 v: i64 = 4294967296
1617 a: i64 = 65536
1618 expected: i64 = a * a
1619 if v == expected {
1620 return 0
1621 }
1622 return 1
1623}
1624"#,
1625 );
1626 assert!(
1627 matches!(outcome, RunOutcome::Halted(0)),
1628 "li 0x1_0000_0000 should load 4294967296 (true 64-bit path), got {outcome:?}"
1629 );
1630}
1631
1632// --- Global variables (merged from global_var_exec.rs) ---
1633
1634/// A global i32 starts at zero and can be written then read back correctly.
1635#[test]
1636fn global_i32_write_read() {
1637 let (_, outcome, _) = run_hll(
1638 r#"
1639gval: i32 = 0

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected