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

Function for_each_array_with_continue

tests/integration/hll_conformance.rs:371–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

369 );
370}
371
372#[test]
373fn for_each_array_with_continue() {
374 // Skip values below 5: 7 + 9 = 16.
375 assert_exit(
376 r#"
377main: () -> i32 {
378 arr: i32[4] = [3, 5, 7, 9]
379 total: i32 = 0
380 for x in arr {
381 if x < 6 {
382 continue
383 }
384 total = total + x
385 }
386 return total
387}
388"#,
389 16,
390 );
391}
392

Callers

nothing calls this directly

Calls 1

assert_exitFunction · 0.85

Tested by

no test coverage detected