Files
kotlin-fork/compiler/testData/ir/loweredIr/interpreter/constTrimMargin.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

19 lines
434 B
Kotlin
Vendored

// WITH_STDLIB
const val trimMargin = "123".trimMargin()
const val trimMarginDefault = """ABC
|123
|456""".trimMargin()
const val withoutMargin = """
#XYZ
#foo
#bar
""".trimMargin("#")
fun box(): String {
if (trimMargin != "123") return "Fail 1"
if (trimMarginDefault != "ABC\n123\n456") return "Fail 2"
if (withoutMargin != "XYZ\nfoo\nbar") return "Fail 3"
return "OK"
}