()
| 269 | ); |
| 270 | } |
| 271 | |
| 272 | #[test] |
| 273 | fn 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#" |
| 278 | main: () -> 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 |
nothing calls this directly
no test coverage detected