Replace appendln with appendLine in project
Original commit: 6e67e1e78d
This commit is contained in:
+5
-5
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
+4
-4
@@ -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)
|
||||
|
||||
+11
-11
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user