Files
kotlin-fork/backend.native/tests/codegen/branching/when_through.kt
T
2017-10-20 18:25:05 +03:00

18 lines
274 B
Kotlin

package codegen.branching.when_through
import kotlin.test.*
fun when_through(i: Int): Int {
var value = 1
when (i) {
10 -> value = 42
11 -> value = 43
12 -> value = 44
}
return value
}
@Test fun runTest() {
if (when_through(2) != 1) throw Error()
}