From ebe2d0b14d76709bb3cf424f088e7128e92457ee Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 4 Jul 2017 14:02:40 +0200 Subject: [PATCH] check stub wellformedness after intention invocation in tests --- .../codeInsight/daemon/quickFix/LightQuickFixTestCase.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java index a8c5362c61fc..f677492e04b6 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java @@ -30,6 +30,7 @@ import com.intellij.psi.PsiFile; import com.intellij.psi.util.PsiUtil; import com.intellij.testFramework.LightPlatformCodeInsightTestCase; import com.intellij.testFramework.LightPlatformTestCase; +import com.intellij.testFramework.PsiTestUtil; import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl; import com.intellij.util.IncorrectOperationException; import com.intellij.util.ObjectUtils; @@ -115,6 +116,9 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase fail("Action '" + text + "' is still available after its invocation in test " + testFullPath); } } + + PsiTestUtil.checkStubsMatchText(quickFix.getFile()); + String expectedFilePath = ObjectUtils.notNull(quickFix.getBasePath(), "") + "/" + AFTER_PREFIX + testName; quickFix.checkResultByFile("In file :" + expectedFilePath, expectedFilePath, false);