irText tests for KT-19306

This commit is contained in:
Dmitry Petrov
2020-12-23 14:04:24 +03:00
committed by TeamCityServer
parent 9f908cdf7c
commit 0841a6b0ea
8 changed files with 187 additions and 8 deletions
@@ -119,15 +119,17 @@ abstract class AbstractIrTextTestCase : AbstractIrGeneratorTestCase() {
TestCase.assertEquals("IR dump mismatch after deep copy with symbols", actualTrees, copiedTrees)
verify(irFileCopy)
val kotlinLikeDump = irFile.dumpKotlinLike(
KotlinLikeDumpOptions(
printFileName = false,
printFilePath = false,
printFakeOverridesStrategy = FakeOverridesStrategy.NONE
if (!testFile.directives.contains("SKIP_KT_DUMP")) {
val kotlinLikeDump = irFile.dumpKotlinLike(
KotlinLikeDumpOptions(
printFileName = false,
printFilePath = false,
printFakeOverridesStrategy = FakeOverridesStrategy.NONE
)
)
)
val kotlinLikeDumpExpectedFile = irTreeFileLabel.expectedTextFile.withReplacedExtensionOrNull(".txt", ".kt.txt")!!
KotlinTestUtils.assertEqualsToFile(kotlinLikeDumpExpectedFile, kotlinLikeDump)
val kotlinLikeDumpExpectedFile = irTreeFileLabel.expectedTextFile.withReplacedExtensionOrNull(".txt", ".kt.txt")!!
KotlinTestUtils.assertEqualsToFile(kotlinLikeDumpExpectedFile, kotlinLikeDump)
}
}
try {