Remove some legacy codegen tests, move some to generated
This commit is contained in:
committed by
Alexander Udalov
parent
f8dfaf4599
commit
bab127ad33
@@ -0,0 +1,14 @@
|
||||
fun isZero(x: Int) = when(x) {
|
||||
0 -> true
|
||||
else -> throw Exception()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
isZero(1)
|
||||
}
|
||||
catch (e: Exception) {
|
||||
return "OK"
|
||||
}
|
||||
return "Fail"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fun foo(x: Any) =
|
||||
when (x) {
|
||||
0, 1 -> "bit"
|
||||
else -> "something"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (foo(0) != "bit") return "Fail 0"
|
||||
if (foo(1) != "bit") return "Fail 1"
|
||||
if (foo(2) != "something") return "Fail 2"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user