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

Function memory_self_test_small_buf_passes

tests/integration/platform_stdlib.rs:1314–1338  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1312 assert_eq!(exit, Some(42), "cross-module call should return 42");
1313}
1314
1315/// Verify cross-module calls through an intermediate module.
1316#[test]
1317fn cross_module_la_works() {
1318 let mut pipeline = CompilationPipeline::new();
1319 pipeline.set_write_artifacts(false);
1320
1321 let stdlib_objs =
1322 CompilationPipeline::compile_stdlib_objects(TargetMode::Hosted).expect("stdlib compile");
1323
1324 // Module A: a helper returning 99
1325 let module_a = r#"
1326 export get_99: () -> i32 {
1327 return 99
1328 }
1329 "#;
1330
1331 // Module B: calls module A's function
1332 let module_b = r#"
1333 external get_99: () -> i32
1334
1335 main: () -> i32 {
1336 return get_99()
1337 }
1338 "#;
1339
1340 let a_result = pipeline.compile(module_a).expect("module a compile");
1341 let (_, a_tokens) = pipeline

Callers

nothing calls this directly

Calls 1

run_kernel_hllFunction · 0.70

Tested by

no test coverage detected