Skip to content

Commit

Permalink
adding test for continue label
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwilliams committed Sep 27, 2020
1 parent 14d3d76 commit 3acd92b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions boa/src/exec/iteration/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,19 @@ fn for_loop_break_label() {
"#;
assert_eq!(&exec(scenario), "\"01\"")
}

#[test]
fn for_loop_continue_label() {
let scenario = r#"
var count = 0;
label: for (let x = 0; x < 10;) {
while (true) {
x++;
count++;
continue label;
}
}
count
"#;
assert_eq!(&exec(scenario), "10");
}

0 comments on commit 3acd92b

Please sign in to comment.