[Tests] Migrate backend-independent tests from native to compiler/testData.
^KT-65979
This commit is contained in:
committed by
Space Team
parent
dd9332d9e1
commit
febac0dd5f
@@ -0,0 +1,18 @@
|
||||
// WITH_STDLIB
|
||||
import kotlin.test.*
|
||||
|
||||
inline fun runAndThrow(action: () -> Unit): Nothing {
|
||||
action()
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
inline fun foo(): Int = runAndThrow {
|
||||
return 1
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val result: Any = foo()
|
||||
assertEquals(1, result)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user