[AA LC Test] Cleanup resulting java dump
- Remove redundant spaces - Add empty line at the end
This commit is contained in:
+9
-1
@@ -59,13 +59,21 @@ abstract class AbstractSymbolLightClassesTestBase(
|
|||||||
val project = ktFile.project
|
val project = ktFile.project
|
||||||
|
|
||||||
ignoreExceptionIfIgnoreFirPresent(module) {
|
ignoreExceptionIfIgnoreFirPresent(module) {
|
||||||
val actual = getRenderResult(ktFile, testDataPath, module, project)
|
val actual = getRenderResult(ktFile, testDataPath, module, project).cleanup()
|
||||||
compareResults(testServices, actual)
|
compareResults(testServices, actual)
|
||||||
removeIgnoreFir(module)
|
removeIgnoreFir(module)
|
||||||
removeDuplicatedFirJava(testServices)
|
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(
|
protected abstract fun getRenderResult(
|
||||||
ktFile: KtFile,
|
ktFile: KtFile,
|
||||||
testDataFile: Path,
|
testDataFile: Path,
|
||||||
|
|||||||
Reference in New Issue
Block a user