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

Function mem_i32_store_load

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

Source from the content-addressed store, hash-verified

1638 r#"
1639gval: i32 = 0
1640
1641main: () -> i32 {
1642 gval = 42
1643 v: i32 = gval
1644 if v == 42 {
1645 return 0
1646 }
1647 return 1
1648}
1649"#,
1650 );
1651 assert!(
1652 matches!(outcome, RunOutcome::Halted(0)),
1653 "global i32 write 42 then read should return 42, got {outcome:?}"
1654 );
1655}
1656
1657/// A global i64 can hold a large positive value (> i32::MAX).
1658#[test]
1659fn global_i64_write_large_value() {
1660 let (_, outcome, _) = run_hll(
1661 r#"
1662big_addr: i64 = 0
1663
1664main: () -> i32 {

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected