[FIR TEST] Fix FIR_IDENTICAL adding for Fir2IrTextTestGenerated

This commit is contained in:
Mikhail Glukhikh
2020-03-10 10:36:08 +03:00
parent dd7ac1343e
commit 7ea4c20f3d
@@ -33,7 +33,13 @@ fun compareAndMergeFirFileAndOldFrontendFile(
} }
if (sameDumps) { if (sameDumps) {
frontendIRTestDataFile.delete() frontendIRTestDataFile.delete()
oldFrontendTestDataFile.writeText("// FIR_IDENTICAL\n" + oldFrontendTestDataFile.readText()) val oldFrontendTestDataFilePath = oldFrontendTestDataFile.absolutePath
val fileWithFirIdentical = if (!oldFrontendTestDataFilePath.endsWith(".txt")) {
oldFrontendTestDataFile
} else {
File(oldFrontendTestDataFilePath.replace(".txt", ".kt"))
}
fileWithFirIdentical.writeText("// FIR_IDENTICAL\n" + fileWithFirIdentical.readText())
} }
TestCase.assertFalse( TestCase.assertFalse(
"Dumps via FIR & via old FE are the same. " + "Dumps via FIR & via old FE are the same. " +