JS: move more test to box tests
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user