Merge boxWithStdlib testData into box, delete BoxWithStdlib test
This commit is contained in:
committed by
Alexander Udalov
parent
22bfc9786a
commit
06a67e6602
@@ -0,0 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
package regressions
|
||||
|
||||
fun f(xs: Iterator<Int>): Int {
|
||||
var answer = 0
|
||||
for (x in xs) {
|
||||
answer += x
|
||||
}
|
||||
return answer
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val list = arrayListOf(1, 2, 3)
|
||||
val result = f(list.iterator())
|
||||
return if (6 == result) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user