[IR] Print evaluated const directly into interpreter's tests

This commit is contained in:
Ivan Kylchik
2023-04-07 17:16:01 +02:00
committed by Space Team
parent 0b70b7904d
commit 5956e9b500
54 changed files with 1459 additions and 1375 deletions
@@ -3,15 +3,15 @@
// TARGET_BACKEND: JS_IR
// WITH_STDLIB
const val byteVal: UByte = 1u
const val shortVal: UShort = 2u
const val intVal: UInt = 3u
const val longVal: ULong = 4uL
const val byteVal: UByte = <!EVALUATED("1")!>1u<!>
const val shortVal: UShort = <!EVALUATED("2")!>2u<!>
const val intVal: UInt = <!EVALUATED("3")!>3u<!>
const val longVal: ULong = <!EVALUATED("4")!>4uL<!>
fun box(): String {
if (byteVal != 1u.toUByte()) return "Fail 1"
if (shortVal != 2u.toUShort()) return "Fail 2"
if (intVal != 3u.toUInt()) return "Fail 3"
if (longVal != 4u.toULong()) return "Fail 4"
if (<!EVALUATED("1")!>byteVal<!> != 1u.toUByte()) return "Fail 1"
if (<!EVALUATED("2")!>shortVal<!> != 2u.toUShort()) return "Fail 2"
if (<!EVALUATED("3")!>intVal<!> != 3u.toUInt()) return "Fail 3"
if (<!EVALUATED("4")!>longVal<!> != 4u.toULong()) return "Fail 4"
return "OK"
}
}