[Test] Show diff between fir file and testdata text if FE 1.0 and FIR test files don't match

This commit is contained in:
Dmitriy Novozhilov
2021-04-19 10:55:06 +03:00
committed by TeamCityServer
parent 4353365968
commit 83bae89ed8
@@ -37,9 +37,15 @@ class FirTestDataConsistencyHandler(testServices: TestServices) : AfterAnalysisC
originalFileContent = originalFileContent.replace("\r\n", "\n")
firFileContent = firFileContent.replace("\r\n", "\n")
}
testServices.assertions.assertEquals(originalFileContent, firFileContent) {
"Original and fir test data aren't identical. " +
"Please, add changes from ${testData.name} to ${firTestData.name}"
if (originalFileContent != firFileContent) {
testServices.assertions.assertEqualsToFile(
firTestData,
originalFileContent,
message = {
"Original and fir test data aren't identical. " +
"Please, add changes from ${testData.name} to ${firTestData.name}"
}
)
}
}