Add ir interpreter tests

This commit is contained in:
Ivan Kylchik
2021-05-19 16:27:03 +03:00
committed by TeamCityServer
parent cc2d7340dc
commit e28ab45c51
115 changed files with 5104 additions and 0 deletions
@@ -0,0 +1,20 @@
// FILE: main.kt
@CompileTimeCalculation
fun callToOtherFile(mustThrowException: Boolean, message: String): Int {
if (mustThrowException) throwException(message)
return 0
}
const val a = <!WAS_NOT_EVALUATED: `
Exception java.lang.Exception: Exception from file1.kt
at File1Kt.throwException(file1.kt:19)
at MainKt.callToOtherFile(main.kt:5)
at MainKt.<clinit>(main.kt:9)`!>callToOtherFile(true, "Exception from file1.kt")<!>
// FILE: file1.kt
@CompileTimeCalculation
fun throwException(message: String) {
throw Exception(message)
}