[AA LC Test] Cleanup resulting java dump
- Remove redundant spaces - Add empty line at the end
This commit is contained in:
+10
-2
@@ -59,13 +59,21 @@ abstract class AbstractSymbolLightClassesTestBase(
|
||||
val project = ktFile.project
|
||||
|
||||
ignoreExceptionIfIgnoreFirPresent(module) {
|
||||
val actual = getRenderResult(ktFile, testDataPath, module, project)
|
||||
val actual = getRenderResult(ktFile, testDataPath, module, project).cleanup()
|
||||
compareResults(testServices, actual)
|
||||
removeIgnoreFir(module)
|
||||
removeDuplicatedFirJava(testServices)
|
||||
}
|
||||
}
|
||||
|
||||
private fun String.cleanup(): String {
|
||||
val lines = this.lines().mapTo(mutableListOf()) { it.ifBlank { "" } }
|
||||
if (lines.last().isNotBlank()) {
|
||||
lines += ""
|
||||
}
|
||||
return lines.joinToString("\n")
|
||||
}
|
||||
|
||||
protected abstract fun getRenderResult(
|
||||
ktFile: KtFile,
|
||||
testDataFile: Path,
|
||||
@@ -149,4 +157,4 @@ abstract class AbstractSymbolLightClassesTestBase(
|
||||
applicability = DirectiveApplicability.Global
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user