From aca05003a911ab4ad5a370448babb7e4c7b9089c Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Tue, 4 Oct 2016 10:40:32 +0300 Subject: [PATCH] Set up tests for postfix templates properly If there are some other completion-like tests before these ones it may lead to the situation when some value is already written by `previouslySuggestedExpressions`, so it should be cleared in setUp --- .../postfix/AbstractPostfixTemplateProviderTest.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/postfix/AbstractPostfixTemplateProviderTest.kt b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/postfix/AbstractPostfixTemplateProviderTest.kt index 8d318d5dedb..0e849c9208e 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/postfix/AbstractPostfixTemplateProviderTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/postfix/AbstractPostfixTemplateProviderTest.kt @@ -28,6 +28,12 @@ abstract class AbstractPostfixTemplateProviderTest : KotlinLightCodeInsightFixtu override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE override fun getTestDataPath() = KotlinTestUtils.getHomeDirectory() + + override fun setUp() { + super.setUp() + KtPostfixTemplateProvider.previouslySuggestedExpressions = emptyList() + } + protected fun doTest(fileName: String) { myFixture.configureByFile(fileName)