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

Function for_continue_still_steps

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

Source from the content-addressed store, hash-verified

269 );
270}
271
272#[test]
273fn for_continue_still_steps() {
274 // `continue` must still advance the counter, else this would hang.
275 // Sum of odd i in 0..6 = 1 + 3 + 5 = 9.
276 assert_exit(
277 r#"
278main: () -> i32 {
279 total: i32 = 0
280 for i in 0..6 {
281 if i % 2 == 0 {
282 continue
283 }
284 total = total + i
285 }
286 return total
287}
288"#,
289 9,
290 );
291}
292

Callers

nothing calls this directly

Calls 1

assert_exitFunction · 0.85

Tested by

no test coverage detected