[IR][tests] Extend test for IR linkage issues related to functions
This commit is contained in:
+16
-3
@@ -2,16 +2,29 @@ fun test1(): String {
|
||||
try {
|
||||
return qux(true)
|
||||
} catch(e: Throwable) {
|
||||
if (e.isLinkageError("/exp_foo")) return "O"
|
||||
if (e.isLinkageError("/exp_foo")) return "OK"
|
||||
}
|
||||
|
||||
return "FAIL2"
|
||||
return "FAIL5"
|
||||
}
|
||||
|
||||
fun test2(): String = qux(false)
|
||||
|
||||
fun test3(): String {
|
||||
try {
|
||||
return qux2(true)
|
||||
} catch(e: Throwable) {
|
||||
if (e.isLinkageError("/A.exp_foo")) return "OK"
|
||||
}
|
||||
|
||||
return "FAIL6"
|
||||
}
|
||||
|
||||
fun test4(): String = qux2(false)
|
||||
|
||||
fun box(): String {
|
||||
return test1() + test2()
|
||||
val result = test1() + test2() + test3() + test4()
|
||||
return if (result == "OKOKOKOK") "OK" else result
|
||||
}
|
||||
|
||||
private fun Throwable.isLinkageError(symbolName: String): Boolean =
|
||||
|
||||
Reference in New Issue
Block a user