JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-29 12:37:13 +03:00
parent efb82a044f
commit cdf2212c73
70 changed files with 484 additions and 749 deletions
@@ -0,0 +1,34 @@
package foo
// CHECK_LABELS_COUNT: function=test1 name=loop count=1
// CHECK_LABELS_COUNT: function=test2 name=loop count=1
fun test1() {
var `loop$` = 0
loop@ for (i in 1..10) {
`loop$` = i
if (i == 5) break@loop
}
assertEquals(5, `loop$`, "test1")
}
fun test2() {
var loop = 0
loop@ for (i in 1..10) {
loop = i
if (i == 5) break@loop
}
assertEquals(5, loop, "test2")
}
fun box(): String {
test1()
test2()
return "OK"
}