[K/N][Tests] Adjust moved tests interfaceCallsNCasts..vector to new infra

^KT-61259
This commit is contained in:
Vladimir Sukharev
2023-12-16 23:54:04 +01:00
committed by Space Team
parent 93642020ff
commit bb8a7b6795
163 changed files with 841 additions and 672 deletions
+17 -9
View File
@@ -3,28 +3,36 @@
* that can be found in the LICENSE file.
*/
package codegen.`try`.catch6
import kotlin.test.*
@Test fun runTest() {
val sb = StringBuilder()
fun box(): String {
try {
println("Before")
sb.appendLine("Before")
foo()
println("After")
sb.appendLine("After")
} catch (e: Exception) {
println("Caught Exception")
sb.appendLine("Caught Exception")
} catch (e: Error) {
println("Caught Error")
sb.appendLine("Caught Error")
}
println("Done")
sb.appendLine("Done")
assertEquals("""
Before
Caught Error
Done
""".trimIndent(), sb.toString())
return "OK"
}
fun foo() {
try {
throw Error("Error happens")
} catch (e: Exception) {
println("Caught Exception")
sb.appendLine("Caught Exception")
}
}