summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testContinueWithLabel.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testContinueWithLabel.js')
-rw-r--r--js/src/jit-test/tests/basic/testContinueWithLabel.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testContinueWithLabel.js b/js/src/jit-test/tests/basic/testContinueWithLabel.js
new file mode 100644
index 000000000..b851b41de
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testContinueWithLabel.js
@@ -0,0 +1,16 @@
+function testContinueWithLabel() {
+ var i = 0;
+ var j = 20;
+ checkiandj :
+ while (i < 10) {
+ i += 1;
+ checkj :
+ while (j > 10) {
+ j -= 1;
+ if ((j % 2) == 0)
+ continue checkj;
+ }
+ }
+ return i + j;
+}
+assertEq(testContinueWithLabel(), 20);