1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-26 20:28:49 +08:00

Test condition in case of continue in do-while

This commit is contained in:
Robert Krimen
2012-11-06 17:27:12 -08:00
parent b81abbf3c6
commit a4de862caa
5 changed files with 31 additions and 13 deletions

View File

@@ -566,6 +566,24 @@ func TestTryFinally(t *testing.T) {
}
`)
test("result", "2")
test(`
var abc = false, def = 0;
do {
def += 1;
if (def > 100) {
break;
}
try {
continue;
}
finally {
abc = true;
}
}
while(!abc && def < 10)
def;
`, "10")
}
func TestTryCatch(t *testing.T) {