Add runTestInWriteCommand flag to AbstractImportTest

This commit is contained in:
Roman Golyshev
2020-08-26 11:38:50 +03:00
committed by Space
parent 2d5b685535
commit 0de251e50d
@@ -62,7 +62,11 @@ abstract class AbstractImportsTest : KotlinLightCodeInsightFixtureTestCase() {
codeStyleSettings.PACKAGES_TO_USE_STAR_IMPORTS.addEntry(KotlinPackageEntry(it.trim(), true))
}
val log = project.executeWriteCommand<String?>("") { doTest(file) }
val log = if (runTestInWriteCommand) {
project.executeWriteCommand<String?>("") { doTest(file) }
} else {
doTest(file)
}
KotlinTestUtils.assertEqualsToFile(File("$testPath.after"), myFixture.file.text)
if (log != null) {
@@ -86,4 +90,6 @@ abstract class AbstractImportsTest : KotlinLightCodeInsightFixtureTestCase() {
protected open val nameCountToUseStarImportForMembersDefault: Int
get() = 3
protected open val runTestInWriteCommand: Boolean = true
}