Merge boxWithStdlib testData into box, delete BoxWithStdlib test
This commit is contained in:
committed by
Alexander Udalov
parent
22bfc9786a
commit
06a67e6602
+23
@@ -0,0 +1,23 @@
|
||||
// WITH_REFLECT
|
||||
|
||||
fun foo(x: Int, y: Int = 2) = x + y
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
::foo.callBy(mapOf())
|
||||
return "Fail: IllegalArgumentException must have been thrown"
|
||||
}
|
||||
catch (e: IllegalArgumentException) {
|
||||
// OK
|
||||
}
|
||||
|
||||
try {
|
||||
::foo.callBy(mapOf(::foo.parameters.last() to 1))
|
||||
return "Fail: IllegalArgumentException must have been thrown"
|
||||
}
|
||||
catch (e: IllegalArgumentException) {
|
||||
// OK
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user