Kapt: remove support for old JVM backend

#KT-64680 Fixed
This commit is contained in:
Alexander Udalov
2024-01-02 17:56:01 +01:00
committed by Space Team
parent c251eb19a6
commit a9f85d75f4
8 changed files with 13 additions and 60 deletions
@@ -160,19 +160,11 @@ internal class Kapt4Handler(testServices: TestServices) : AnalysisHandler<Kapt4C
fun Assertions.checkTxt(module: TestModule, actual: String) {
val testDataFile = module.files.first().originalFile
val firFile = testDataFile.withExtension("fir.txt")
val irFile = testDataFile.withExtension("ir.txt")
val txtFile = testDataFile.withExtension("txt")
val expectedFile = sequenceOf(firFile, irFile, txtFile)
.firstOrNull { it.exists() } ?: firFile
val expectedFile = if (firFile.exists()) firFile else txtFile
assertEqualsToFile(expectedFile, actual)
if (firFile.exists()) {
if (irFile.exists()) {
if (irFile.readText() == firFile.readText()) {
fail { ".fir.txt and .ir.txt golden files are identical. Remove $firFile." }
}
} else if (txtFile.exists() && txtFile.readText() == firFile.readText()) {
fail { ".fir.txt and .txt golden files are identical. Remove $firFile." }
}
if (firFile.exists() && txtFile.exists() && txtFile.readText() == firFile.readText()) {
fail { ".fir.txt and .txt golden files are identical. Remove $firFile." }
}
}
}