()
| 369 | ); |
| 370 | } |
| 371 | |
| 372 | #[test] |
| 373 | fn for_each_array_with_continue() { |
| 374 | // Skip values below 5: 7 + 9 = 16. |
| 375 | assert_exit( |
| 376 | r#" |
| 377 | main: () -> 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 |
nothing calls this directly
no test coverage detected