Rewrite ir interpreter's dump tests to box
Box tests will check the correctness of interpreter, meantime by dumped ir we can understand that expression was folded.
This commit is contained in:
@@ -6,3 +6,10 @@ const val name1 = EnumClass.OK.name
|
||||
const val name2 = EnumClass.VALUE.name
|
||||
const val name3 = EnumClass.anotherValue.name
|
||||
const val name4 = EnumClass.WITH_UNDERSCORE.name
|
||||
|
||||
fun box(): String {
|
||||
if (name2 != "VALUE") return "Fail 1"
|
||||
if (name3 != "anotherValue") return "Fail 2"
|
||||
if (name4 != "WITH_UNDERSCORE") return "Fail 3"
|
||||
return name1
|
||||
}
|
||||
Reference in New Issue
Block a user