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) {
|
fun doTest(path: String) {
|
||||||
val sb = StringBuilder()
|
val sb = StringBuilder()
|
||||||
fun StringBuilder.indentln(string: String) {
|
fun StringBuilder.indentln(string: String) {
|
||||||
appendln(" $string")
|
appendLine(" $string")
|
||||||
}
|
}
|
||||||
fun CompilerOutput.logOutput(stepName: 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 }) {
|
for (compiledFile in compiledFiles.sortedBy { it.canonicalPath }) {
|
||||||
val lookupsFromFile = lookups[compiledFile]
|
val lookupsFromFile = lookups[compiledFile]
|
||||||
val lookupStatus = when {
|
val lookupStatus = when {
|
||||||
@@ -229,10 +229,10 @@ abstract class AbstractLookupTrackerTest : TestWithWorkingDir() {
|
|||||||
sb.indentln("$relativePath$lookupStatus")
|
sb.indentln("$relativePath$lookupStatus")
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.appendln("Exit code: $exitCode")
|
sb.appendLine("Exit code: $exitCode")
|
||||||
errors.forEach(sb::indentln)
|
errors.forEach(sb::indentln)
|
||||||
|
|
||||||
sb.appendln()
|
sb.appendLine()
|
||||||
}
|
}
|
||||||
|
|
||||||
val testDir = File(path)
|
val testDir = File(path)
|
||||||
|
|||||||
@@ -716,12 +716,12 @@ open class KotlinJpsBuildTest : KotlinJpsBuildTestBase() {
|
|||||||
|
|
||||||
for (i in 0..classCount) {
|
for (i in 0..classCount) {
|
||||||
val code = buildString {
|
val code = buildString {
|
||||||
appendln("package foo")
|
appendLine("package foo")
|
||||||
appendln("class Foo$i {")
|
appendLine("class Foo$i {")
|
||||||
for (j in 0..methodCount) {
|
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)
|
File(srcDir, "Foo$i.kt").writeText(code)
|
||||||
|
|||||||
+4
-4
@@ -716,12 +716,12 @@ open class KotlinJpsBuildTest : KotlinJpsBuildTestBase() {
|
|||||||
|
|
||||||
for (i in 0..classCount) {
|
for (i in 0..classCount) {
|
||||||
val code = buildString {
|
val code = buildString {
|
||||||
appendln("package foo")
|
appendLine("package foo")
|
||||||
appendln("class Foo$i {")
|
appendLine("class Foo$i {")
|
||||||
for (j in 0..methodCount) {
|
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)
|
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 {
|
serviceKtFile(module, fileNameSuffix).setFileContent(buildString {
|
||||||
if (settings.generatePlatformDependent)
|
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)
|
appendTestFun(module, settings)
|
||||||
})
|
})
|
||||||
@@ -364,14 +364,14 @@ class MppJpsIncTestsGenerator(val txt: ModulesTxt, val testCaseDirProvider: (Tes
|
|||||||
serviceKtFile(module, fileNameSuffix).setFileContent(buildString {
|
serviceKtFile(module, fileNameSuffix).setFileContent(buildString {
|
||||||
if (settings.generatePlatformDependent) {
|
if (settings.generatePlatformDependent) {
|
||||||
for (expectedBy in settings.generateActualDeclarationsFor) {
|
for (expectedBy in settings.generateActualDeclarationsFor) {
|
||||||
appendln(
|
appendLine(
|
||||||
"actual fun ${expectedBy.platformDependentFunName}(): String" +
|
"actual fun ${expectedBy.platformDependentFunName}(): String" +
|
||||||
" = \"${module.name}$fileNameSuffix\""
|
" = \"${module.name}$fileNameSuffix\""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
appendln(
|
appendLine(
|
||||||
"fun ${module.platformOnlyFunName}()" +
|
"fun ${module.platformOnlyFunName}()" +
|
||||||
" = \"${module.name}$fileNameSuffix\""
|
" = \"${module.name}$fileNameSuffix\""
|
||||||
)
|
)
|
||||||
@@ -398,29 +398,29 @@ class MppJpsIncTestsGenerator(val txt: ModulesTxt, val testCaseDirProvider: (Tes
|
|||||||
module: ModulesTxt.Module,
|
module: ModulesTxt.Module,
|
||||||
settings: ModuleContentSettings
|
settings: ModuleContentSettings
|
||||||
) {
|
) {
|
||||||
appendln()
|
appendLine()
|
||||||
appendln("fun Test${module.serviceName}() {")
|
appendLine("fun Test${module.serviceName}() {")
|
||||||
|
|
||||||
val thisAndDependencies = mutableSetOf(module)
|
val thisAndDependencies = mutableSetOf(module)
|
||||||
module.collectDependenciesRecursivelyTo(thisAndDependencies)
|
module.collectDependenciesRecursivelyTo(thisAndDependencies)
|
||||||
thisAndDependencies.forEach { thisOrDependent ->
|
thisAndDependencies.forEach { thisOrDependent ->
|
||||||
if (thisOrDependent.isCommonModule) {
|
if (thisOrDependent.isCommonModule) {
|
||||||
appendln(" ${thisOrDependent.platformIndependentFunName}()")
|
appendLine(" ${thisOrDependent.platformIndependentFunName}()")
|
||||||
|
|
||||||
if (settings.generatePlatformDependent) {
|
if (settings.generatePlatformDependent) {
|
||||||
appendln(" ${thisOrDependent.platformDependentFunName}()")
|
appendLine(" ${thisOrDependent.platformDependentFunName}()")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// platform module
|
// platform module
|
||||||
appendln(" ${thisOrDependent.platformOnlyFunName}()")
|
appendLine(" ${thisOrDependent.platformOnlyFunName}()")
|
||||||
|
|
||||||
if (thisOrDependent.isJvmModule && thisOrDependent.contentsSettings.generateJavaFile) {
|
if (thisOrDependent.isJvmModule && thisOrDependent.contentsSettings.generateJavaFile) {
|
||||||
appendln(" ${thisOrDependent.javaClassName}().doStuff()")
|
appendLine(" ${thisOrDependent.javaClassName}().doStuff()")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
appendln("}")
|
appendLine("}")
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun ModulesTxt.Module.collectDependenciesRecursivelyTo(
|
private fun ModulesTxt.Module.collectDependenciesRecursivelyTo(
|
||||||
|
|||||||
Reference in New Issue
Block a user