[IR] Add id method in interpreter's tests to avoid optimizations
This commit is contained in:
+3
-2
@@ -2,6 +2,7 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_K1: JVM_IR
|
||||
// WITH_STDLIB
|
||||
fun <T> T.id() = this
|
||||
|
||||
const val trimIndent = "123".<!EVALUATED("123")!>trimIndent()<!>
|
||||
const val complexTrimIndent =
|
||||
@@ -12,7 +13,7 @@ const val complexTrimIndent =
|
||||
""".<!EVALUATED("ABC\n123\n456")!>trimIndent()<!>
|
||||
|
||||
fun box(): String {
|
||||
if (<!EVALUATED("false")!>trimIndent != "123"<!>) return "Fail 1"
|
||||
if (<!EVALUATED("false")!>complexTrimIndent != "ABC\n123\n456"<!>) return "Fail 2"
|
||||
if (<!EVALUATED("123")!>trimIndent<!>.id() != "123") return "Fail 1"
|
||||
if (<!EVALUATED("ABC\n123\n456")!>complexTrimIndent<!>.id() != "ABC\n123\n456") return "Fail 2"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user