Replace appendln with appendLine in project

This commit is contained in:
Alexander Udalov
2020-06-09 21:09:45 +02:00
parent d1c88798df
commit 6e67e1e78d
76 changed files with 405 additions and 402 deletions
@@ -685,13 +685,13 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
else -> "?"
}
val compiledPort: Int? = daemonInfo.trim().split(" ").last().toIntOrNull()
appendln("#$i\tcompiled on $daemonInfo, session ${daemonInfos[i]?.second}, result ${resultCodes[i]}; started daemon on port ${port2logs[i]?.first}, log: ${logFiles[i]?.canonicalPath}")
appendLine("#$i\tcompiled on $daemonInfo, session ${daemonInfos[i]?.second}, result ${resultCodes[i]}; started daemon on port ${port2logs[i]?.first}, log: ${logFiles[i]?.canonicalPath}")
if (resultCodes[i] != 0 || electionLogs[i] == null) {
appendln("--- out $i, result ${resultCodes[i]}:\n${outStreams[i].toByteArray().toString(Charset.defaultCharset())}\n---")
appendLine("--- out $i, result ${resultCodes[i]}:\n${outStreams[i].toByteArray().toString(Charset.defaultCharset())}\n---")
compiledPort?.let { port -> port2logs.find { it?.first == port } }?.second?.let { logFile ->
appendln("--- log file ${logFile.name}:\n${logFile.readText()}\n---")
appendLine("--- log file ${logFile.name}:\n${logFile.readText()}\n---")
}
?: appendln("--- log not found (port: $compiledPort)")
?: appendLine("--- log not found (port: $compiledPort)")
}
}
}
@@ -917,20 +917,20 @@ internal fun generateLargeKotlinFile(size: Int): String {
return buildString {
append("package large\n\n")
(0..size).forEach {
appendln("class Class$it")
appendln("{")
appendln("\tfun foo(): Long = $it")
appendln("}")
appendln("\n")
appendLine("class Class$it")
appendLine("{")
appendLine("\tfun foo(): Long = $it")
appendLine("}")
appendLine("\n")
repeat(2000) {
appendln("// kotlin rules ... and stuff")
appendLine("// kotlin rules ... and stuff")
}
}
appendln("fun main(args: Array<String>)")
appendln("{")
appendln("\tval result = Class5().foo() + Class$size().foo()")
appendln("\tprintln(result)")
appendln("}")
appendLine("fun main(args: Array<String>)")
appendLine("{")
appendLine("\tval result = Class5().foo() + Class$size().foo()")
appendLine("\tprintln(result)")
appendLine("}")
}
}
@@ -980,13 +980,13 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
else -> "?"
}
val compiledPort: Int? = daemonInfo.trim().split(" ").last().toIntOrNull()
appendln("#$i\tcompiled on $daemonInfo, session ${daemonInfos[i]?.second}, result ${resultCodes[i]}; started daemon on port ${port2logs[i]?.first}, log: ${logFiles[i]?.canonicalPath}")
appendLine("#$i\tcompiled on $daemonInfo, session ${daemonInfos[i]?.second}, result ${resultCodes[i]}; started daemon on port ${port2logs[i]?.first}, log: ${logFiles[i]?.canonicalPath}")
if (resultCodes[i] != 0 || electionLogs[i] == null) {
appendln("--- out $i, result ${resultCodes[i]}:\n${outStreams[i].toByteArray().toString(Charset.defaultCharset())}\n---")
appendLine("--- out $i, result ${resultCodes[i]}:\n${outStreams[i].toByteArray().toString(Charset.defaultCharset())}\n---")
compiledPort?.let { port -> port2logs.find { it?.first == port } }?.second?.let { logFile ->
appendln("--- log file ${logFile.name}:\n${logFile.readText()}\n---")
appendLine("--- log file ${logFile.name}:\n${logFile.readText()}\n---")
}
?: appendln("--- log not found (port: $compiledPort)")
?: appendLine("--- log not found (port: $compiledPort)")
}
}
}
@@ -1371,20 +1371,20 @@ internal fun generateLargeKotlinFile(size: Int): String {
return buildString {
append("package large\n\n")
(0..size).forEach {
appendln("class Class$it")
appendln("{")
appendln("\tfun foo(): Long = $it")
appendln("}")
appendln("\n")
appendLine("class Class$it")
appendLine("{")
appendLine("\tfun foo(): Long = $it")
appendLine("}")
appendLine("\n")
repeat(2000) {
appendln("// kotlin rules ... and stuff")
appendLine("// kotlin rules ... and stuff")
}
}
appendln("fun main(args: Array<String>)")
appendln("{")
appendln("\tval result = Class5().foo() + Class$size().foo()")
appendln("\tprintln(result)")
appendln("}")
appendLine("fun main(args: Array<String>)")
appendLine("{")
appendLine("\tval result = Class5().foo() + Class$size().foo()")
appendLine("\tprintln(result)")
appendLine("}")
}
}