Files
kotlin-fork/compiler/testData/codegen/bytecodeText/intrinsicsTrim/trimIndentPositive.kt
T
Mikhail Glukhikh c33a6a665d Revert "Mute a pair of intrinsic trim tests for old BE in LV 2.0"
This reverts commit 876a0768e4.
Related to KT-59171
2023-09-21 12:38:22 +00:00

32 lines
758 B
Kotlin
Vendored

fun constant(): String {
return """
Hello,
World
""".trimIndent()
}
private const val HAS_INDENT = """Hello,
World"""
fun interpolatedUsingConstant(): String {
return """
Hello,
$HAS_INDENT
World
""".trimIndent()
}
private const val SPACES = " "
private const val HELLO = "Hello"
private const val WORLD = "World"
fun reliesOnNestedStringBuilderFlatteningAndConstantConcatenation(): String {
return ("" + '\n' + SPACES + "${SPACES}Hey" + """
${HELLO + HELLO},
${WORLD + WORLD}
""" + SPACES).trimIndent()
}
// 1 LDC "Hello,\\nWorld"
// 1 LDC "Hello,\\nHello,\\nWorld\\nWorld"
// 1 LDC "Hey\\nHelloHello,\\nWorldWorld"
// 0 INVOKESTATIC kotlin/text/StringsKt.trimIndent