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:
Ivan Kylchik
2021-12-13 18:01:28 +03:00
parent fac98b7787
commit 0b22cf6cb9
21 changed files with 199 additions and 541 deletions
@@ -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
}