1b553ebfaf
Added tests from testData/codegen/box directory. There are blackbox tests in other directories and they are to be added.
15 lines
198 B
Kotlin
15 lines
198 B
Kotlin
fun isZero(x: Int) = when(x) {
|
|
0 -> true
|
|
else -> throw Exception()
|
|
}
|
|
|
|
fun box(): String {
|
|
try {
|
|
isZero(1)
|
|
}
|
|
catch (e: Exception) {
|
|
return "OK"
|
|
}
|
|
return "Fail"
|
|
}
|