From 0de251e50d8d5b111692e71f1f1a9674c06d355e Mon Sep 17 00:00:00 2001 From: Roman Golyshev Date: Wed, 26 Aug 2020 11:38:50 +0300 Subject: [PATCH] Add `runTestInWriteCommand` flag to `AbstractImportTest` --- idea/tests/org/jetbrains/kotlin/AbstractImportsTest.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/idea/tests/org/jetbrains/kotlin/AbstractImportsTest.kt b/idea/tests/org/jetbrains/kotlin/AbstractImportsTest.kt index fa09e14be52..179350bc945 100644 --- a/idea/tests/org/jetbrains/kotlin/AbstractImportsTest.kt +++ b/idea/tests/org/jetbrains/kotlin/AbstractImportsTest.kt @@ -62,7 +62,11 @@ abstract class AbstractImportsTest : KotlinLightCodeInsightFixtureTestCase() { codeStyleSettings.PACKAGES_TO_USE_STAR_IMPORTS.addEntry(KotlinPackageEntry(it.trim(), true)) } - val log = project.executeWriteCommand("") { doTest(file) } + val log = if (runTestInWriteCommand) { + project.executeWriteCommand("") { 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 } \ No newline at end of file