JS: move inline test to box tests
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package foo
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
|
||||
internal var counter = 0
|
||||
|
||||
internal fun test(a: Int) {
|
||||
repeat(a) {
|
||||
counter += 1
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(0, counter)
|
||||
test(5)
|
||||
assertEquals(5, counter)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user