Files
kotlin-fork/compiler/testData/ir/loweredIr/interpreter/stdlibConst.kt
T
Ivan Kylchik 0b22cf6cb9 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.
2022-05-18 21:20:01 +03:00

13 lines
251 B
Kotlin
Vendored

// WITH_STDLIB
const val code = '1'.code
const val floorDiv = 10.floorDiv(2)
const val mod = 5.mod(3)
fun box(): String {
if (code != 49) return "Fail 1"
if (floorDiv != 5) return "Fail 2"
if (mod != 2) return "Fail 3"
return "OK"
}