Move IR interpreter's tests from ir/loweredIr directory into box

This commit is contained in:
Ivan Kylchik
2022-12-22 17:22:58 +01:00
committed by Space Team
parent 7d6bac64fb
commit bc21753877
42 changed files with 642 additions and 329 deletions
@@ -0,0 +1,22 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
class A(val OK: Int, val somePropertyWithLongName: String) {
fun foo() {}
}
val topLevelProp = 1
const val propertyName1 = A::OK.name
const val propertyName2 = A::somePropertyWithLongName.name
const val methodName = A::foo.name
const val className = ::A.name
const val topLevelPropName = ::topLevelProp.name
fun box(): String {
if (propertyName1 != "OK") return "Fail 1"
if (propertyName2 != "somePropertyWithLongName") return "Fail 2"
if (methodName != "foo") return "Fail 3"
if (className != "<init>") return "Fail 4"
if (topLevelPropName != "topLevelProp") return "Fail 5"
return "OK"
}