JS backend: added jsCode test cases

This commit is contained in:
Alexey Tsvetkov
2014-12-09 13:46:01 +03:00
parent 97bbcab77d
commit c3f67c54bd
32 changed files with 657 additions and 0 deletions
@@ -0,0 +1,30 @@
package foo
// CHECK_LABELS_COUNT: function=box name=block count=1
// CHECK_LABELS_COUNT: function=box name=block_0 count=1
fun box(): String {
var i = 0
var j = 0
js("""
block: {
i++;
block: {
j++;
break block;
j++;
}
break block;
i++;
}
""")
assertEquals(1, i, "i")
assertEquals(1, j, "j")
return "OK"
}