From f3efd88bb92a1c4c8095a8a0c92e1188eca6b74e Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 9 Jun 2020 21:09:45 +0200 Subject: [PATCH] Replace appendln with appendLine in project Original commit: 6e67e1e78d658dd4cf62511905361f617b53f0d7 --- .../jps/build/AbstractLookupTrackerTest.kt | 10 ++++----- .../kotlin/jps/build/KotlinJpsBuildTest.kt | 8 +++---- .../jps/build/KotlinJpsBuildTest.kt.202 | 8 +++---- .../dependeciestxt/MppJpsIncTestsGenerator.kt | 22 +++++++++---------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt index f93d80e40c8..395fda619cc 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt @@ -212,12 +212,12 @@ abstract class AbstractLookupTrackerTest : TestWithWorkingDir() { fun doTest(path: String) { val sb = StringBuilder() fun StringBuilder.indentln(string: String) { - appendln(" $string") + appendLine(" $string") } fun CompilerOutput.logOutput(stepName: String) { - sb.appendln("==== $stepName ====") + sb.appendLine("==== $stepName ====") - sb.appendln("Compiling files:") + sb.appendLine("Compiling files:") for (compiledFile in compiledFiles.sortedBy { it.canonicalPath }) { val lookupsFromFile = lookups[compiledFile] val lookupStatus = when { @@ -229,10 +229,10 @@ abstract class AbstractLookupTrackerTest : TestWithWorkingDir() { sb.indentln("$relativePath$lookupStatus") } - sb.appendln("Exit code: $exitCode") + sb.appendLine("Exit code: $exitCode") errors.forEach(sb::indentln) - sb.appendln() + sb.appendLine() } val testDir = File(path) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt index 0ca88f64b0f..e78ecb115c4 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt @@ -716,12 +716,12 @@ open class KotlinJpsBuildTest : KotlinJpsBuildTestBase() { for (i in 0..classCount) { val code = buildString { - appendln("package foo") - appendln("class Foo$i {") + appendLine("package foo") + appendLine("class Foo$i {") for (j in 0..methodCount) { - appendln(" fun get${j*j}(): Int = square($j)") + appendLine(" fun get${j*j}(): Int = square($j)") } - appendln("}") + appendLine("}") } File(srcDir, "Foo$i.kt").writeText(code) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt.202 b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt.202 index 3ac350767d3..3e158535610 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt.202 +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt.202 @@ -716,12 +716,12 @@ open class KotlinJpsBuildTest : KotlinJpsBuildTestBase() { for (i in 0..classCount) { val code = buildString { - appendln("package foo") - appendln("class Foo$i {") + appendLine("package foo") + appendLine("class Foo$i {") for (j in 0..methodCount) { - appendln(" fun get${j*j}(): Int = square($j)") + appendLine(" fun get${j*j}(): Int = square($j)") } - appendln("}") + appendLine("}") } File(srcDir, "Foo$i.kt").writeText(code) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/dependeciestxt/MppJpsIncTestsGenerator.kt b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/dependeciestxt/MppJpsIncTestsGenerator.kt index 1da2abcca6a..36700d219e4 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/dependeciestxt/MppJpsIncTestsGenerator.kt +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/dependeciestxt/MppJpsIncTestsGenerator.kt @@ -343,9 +343,9 @@ class MppJpsIncTestsGenerator(val txt: ModulesTxt, val testCaseDirProvider: (Tes serviceKtFile(module, fileNameSuffix).setFileContent(buildString { if (settings.generatePlatformDependent) - appendln("expect fun ${module.platformDependentFunName}(): String") + appendLine("expect fun ${module.platformDependentFunName}(): String") - appendln("fun ${module.platformIndependentFunName}() = \"common$fileNameSuffix\"") + appendLine("fun ${module.platformIndependentFunName}() = \"common$fileNameSuffix\"") appendTestFun(module, settings) }) @@ -364,14 +364,14 @@ class MppJpsIncTestsGenerator(val txt: ModulesTxt, val testCaseDirProvider: (Tes serviceKtFile(module, fileNameSuffix).setFileContent(buildString { if (settings.generatePlatformDependent) { for (expectedBy in settings.generateActualDeclarationsFor) { - appendln( + appendLine( "actual fun ${expectedBy.platformDependentFunName}(): String" + " = \"${module.name}$fileNameSuffix\"" ) } } - appendln( + appendLine( "fun ${module.platformOnlyFunName}()" + " = \"${module.name}$fileNameSuffix\"" ) @@ -398,29 +398,29 @@ class MppJpsIncTestsGenerator(val txt: ModulesTxt, val testCaseDirProvider: (Tes module: ModulesTxt.Module, settings: ModuleContentSettings ) { - appendln() - appendln("fun Test${module.serviceName}() {") + appendLine() + appendLine("fun Test${module.serviceName}() {") val thisAndDependencies = mutableSetOf(module) module.collectDependenciesRecursivelyTo(thisAndDependencies) thisAndDependencies.forEach { thisOrDependent -> if (thisOrDependent.isCommonModule) { - appendln(" ${thisOrDependent.platformIndependentFunName}()") + appendLine(" ${thisOrDependent.platformIndependentFunName}()") if (settings.generatePlatformDependent) { - appendln(" ${thisOrDependent.platformDependentFunName}()") + appendLine(" ${thisOrDependent.platformDependentFunName}()") } } else { // platform module - appendln(" ${thisOrDependent.platformOnlyFunName}()") + appendLine(" ${thisOrDependent.platformOnlyFunName}()") if (thisOrDependent.isJvmModule && thisOrDependent.contentsSettings.generateJavaFile) { - appendln(" ${thisOrDependent.javaClassName}().doStuff()") + appendLine(" ${thisOrDependent.javaClassName}().doStuff()") } } } - appendln("}") + appendLine("}") } private fun ModulesTxt.Module.collectDependenciesRecursivelyTo(