mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
LightPlatformCodeInsightFixtureTestCase -> BasePlatformTestCase
GitOrigin-RevId: 340465bfb7f05081134ae5da009eeba7c7249923
This commit is contained in:
committed by
intellij-monorepo-bot
parent
97e0289250
commit
d2d93d3063
@@ -19,13 +19,13 @@ import com.intellij.codeInsight.editorActions.SelectWordHandler;
|
||||
import com.intellij.ide.DataManager;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Bas Leijdekkers
|
||||
*/
|
||||
public class RegExpWordSelectionFilterTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class RegExpWordSelectionFilterTest extends BasePlatformTestCase {
|
||||
|
||||
public void testSelectWordSkipChar() {
|
||||
doTest("graafm<caret>achine",
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.ex.InspectionProfileImpl;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.profile.codeInspection.ProjectInspectionProfileManager;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.lang.annotations.Language;
|
||||
import org.intellij.lang.regexp.RegExpFileType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* @author Bas Leijdekkers
|
||||
*/
|
||||
public abstract class RegExpInspectionTestCase extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public abstract class RegExpInspectionTestCase extends BasePlatformTestCase {
|
||||
|
||||
@NotNull
|
||||
protected abstract LocalInspectionTool getInspection();
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
package com.intellij.copyright
|
||||
|
||||
import com.intellij.ide.highlighter.JavaFileType
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import com.maddyhome.idea.copyright.CopyrightProfile
|
||||
import com.maddyhome.idea.copyright.psi.UpdateCopyrightFactory
|
||||
|
||||
class JavaCopyrightTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class JavaCopyrightTest : BasePlatformTestCase() {
|
||||
fun testMultipleCopyrightsInOneFile() {
|
||||
myFixture.configureByText(JavaFileType.INSTANCE,
|
||||
"""
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ package com.intellij.ide.fileTemplates;
|
||||
|
||||
import com.intellij.platform.templates.SaveProjectAsTemplateAction;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import gnu.trove.TIntObjectHashMap;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
@@ -12,7 +12,7 @@ import java.util.regex.Pattern;
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public class FileTemplatesProcessingTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class FileTemplatesProcessingTest extends BasePlatformTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
@@ -9,11 +9,11 @@ import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.actionSystem.LangDataKeys
|
||||
import com.intellij.openapi.actionSystem.impl.SimpleDataContext
|
||||
import com.intellij.openapi.ide.CopyPasteManager
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import junit.framework.TestCase
|
||||
import java.awt.datatransfer.DataFlavor
|
||||
|
||||
class CreateTBXReferenceTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class CreateTBXReferenceTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath(): String {
|
||||
return "${JavaTestUtil.getJavaTestDataPath()}/codeInsight/copyTBXReference/"
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ import com.intellij.lang.java.JavaLanguage;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
public class JavaReformatOnTypingTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class JavaReformatOnTypingTest extends BasePlatformTestCase {
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.intellij.openapi.fileEditor.TextEditor;
|
||||
import com.intellij.openapi.fileEditor.impl.text.TextEditorProvider;
|
||||
import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class JavaTypingTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class JavaTypingTest extends BasePlatformTestCase {
|
||||
public void testIndentRBrace() {
|
||||
doTest('}');
|
||||
doTestUndo();
|
||||
|
||||
+2
-2
@@ -25,11 +25,11 @@ import com.intellij.formatting.fileSet.NamedScopeDescriptor;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
import static com.intellij.codeInsight.actions.TextRangeType.*;
|
||||
|
||||
public class ReformatCodeActionInEditorTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class ReformatCodeActionInEditorTest extends BasePlatformTestCase {
|
||||
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.FileIndentOptionsProvider;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.io.File;
|
||||
/**
|
||||
* @author Rustam Vishnyakov
|
||||
*/
|
||||
public class FileIndentProviderTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class FileIndentProviderTest extends BasePlatformTestCase {
|
||||
private final FileIndentOptionsProvider TEST_FILE_INDENT_OPTIONS_PROVIDER = new TestIndentOptionsProvider();
|
||||
private CommonCodeStyleSettings.IndentOptions myTestIndentOptions;
|
||||
private boolean myUseOnFullReformat;
|
||||
|
||||
@@ -18,12 +18,12 @@ package com.intellij.java.find;
|
||||
import com.intellij.find.EditorSearchSession;
|
||||
import com.intellij.ide.IdeEventQueue;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
import javax.swing.text.BadLocationException;
|
||||
import javax.swing.text.JTextComponent;
|
||||
|
||||
public class EditorSearchTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class EditorSearchTest extends BasePlatformTestCase {
|
||||
private static final String THE_CODE = "public class A {\n" +
|
||||
" //First comment ABC, ABCD, abc\n" +
|
||||
" int ABC = 3;\n" +
|
||||
|
||||
+2
-2
@@ -10,12 +10,12 @@ import com.intellij.openapi.fileTypes.PlainTextFileType;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiDirectory;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public class EmbeddedLiveTemplatesTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class EmbeddedLiveTemplatesTest extends BasePlatformTestCase {
|
||||
|
||||
public void testCreateFromTemplateAction() {
|
||||
|
||||
|
||||
+2
-2
@@ -22,11 +22,11 @@ import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
|
||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.DetectableIndentOptionsProvider;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
|
||||
|
||||
public class DetectIndentAndTypeTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class DetectIndentAndTypeTest extends BasePlatformTestCase {
|
||||
|
||||
private CodeStyleSettings mySettings;
|
||||
private static final String myText = "public class T {\n" +
|
||||
|
||||
+2
-2
@@ -23,9 +23,9 @@ import com.intellij.psi.PsiDirectory;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
public class TempFileSystemTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class TempFileSystemTest extends BasePlatformTestCase {
|
||||
public void testMove() {
|
||||
ProjectRootManager rootManager = ProjectRootManager.getInstance(getProject());
|
||||
VirtualFile sourceRoot = rootManager.getContentSourceRoots()[0];
|
||||
|
||||
+2
-2
@@ -3,12 +3,12 @@ package com.intellij.java.psi.impl.search
|
||||
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes
|
||||
import com.intellij.psi.impl.java.JavaBinaryPlusExpressionIndex
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import com.intellij.util.indexing.FileContentImpl
|
||||
import com.intellij.util.indexing.IndexingDataKeys
|
||||
import org.intellij.lang.annotations.Language
|
||||
|
||||
class JavaBinaryPlusExpressionIndexTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class JavaBinaryPlusExpressionIndexTest : BasePlatformTestCase() {
|
||||
fun testIndex() {
|
||||
@Language("JAVA")
|
||||
val file = myFixture.configureByText(StdFileTypes.JAVA, """
|
||||
|
||||
+2
-3
@@ -17,12 +17,11 @@ package com.intellij.java.psi.impl.search
|
||||
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes
|
||||
import com.intellij.psi.impl.search.JavaNullMethodArgumentIndex
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import com.intellij.util.indexing.FileContentImpl
|
||||
import com.intellij.util.indexing.IndexingDataKeys
|
||||
import org.intellij.lang.annotations.Language
|
||||
|
||||
class JavaNullMethodArgumentIndexTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class JavaNullMethodArgumentIndexTest : BasePlatformTestCase() {
|
||||
|
||||
fun testIndex() {
|
||||
val file = myFixture.configureByText(StdFileTypes.JAVA, """
|
||||
|
||||
@@ -7,14 +7,14 @@ import com.intellij.ide.projectView.impl.ProjectViewFileNestingService;
|
||||
import com.intellij.ide.projectView.impl.ProjectViewFileNestingService.NestingRule;
|
||||
import com.intellij.ide.projectView.impl.ProjectViewImpl;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class NestedFilesInProjectViewTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class NestedFilesInProjectViewTest extends BasePlatformTestCase {
|
||||
|
||||
private void doTest(@NotNull final String expected) {
|
||||
final ProjectViewImpl projectView = (ProjectViewImpl)ProjectView.getInstance(getProject());
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.codeInsight;
|
||||
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link JavaCodeInsightTestCase} for Java-dependent tests,
|
||||
* {@link com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase} for non-Java-dependent
|
||||
* {@link BasePlatformTestCase} for non-Java-dependent
|
||||
* tests
|
||||
*/
|
||||
@Deprecated
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.codeInsight.completion;
|
||||
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link JavaCompletionTestCase} for Java-dependent completion tests and
|
||||
* {@link com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase} for non-Java-dependent
|
||||
* {@link BasePlatformTestCase} for non-Java-dependent
|
||||
* completion tests
|
||||
*/
|
||||
@Deprecated
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.testFramework;
|
||||
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link JavaInspectionTestCase} for Java-dependent tests,
|
||||
* {@link com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase} for non-Java-dependent tests
|
||||
* {@link BasePlatformTestCase} for non-Java-dependent tests
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class InspectionTestCase extends JavaInspectionTestCase {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.testFramework;
|
||||
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link JavaModuleTestCase} for Java-dependent tests,
|
||||
* {@link com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase} for non-Java-dependent tess
|
||||
* {@link BasePlatformTestCase} for non-Java-dependent tess
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class ModuleTestCase extends JavaModuleTestCase {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.testFramework;
|
||||
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link JavaPsiTestCase} for Java-dependent tests,
|
||||
* {@link com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase} for non-Java-dependent tests
|
||||
* {@link BasePlatformTestCase} for non-Java-dependent tests
|
||||
*/
|
||||
public abstract class PsiTestCase extends JavaPsiTestCase {
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.intellij.testFramework.fixtures;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link LightJavaCodeInsightFixtureTestCase} for Java-dependent tests,
|
||||
* {@link LightPlatformCodeInsightFixtureTestCase} for non-Java dependent tests
|
||||
* {@link BasePlatformTestCase} for non-Java dependent tests
|
||||
*/
|
||||
public abstract class LightCodeInsightFixtureTestCase extends LightJavaCodeInsightFixtureTestCase {
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.siyeh.ig;
|
||||
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link LightJavaInspectionTestCase} for Java-dependent tests,
|
||||
* {@link com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase} for non-Java-dependent tests
|
||||
* {@link BasePlatformTestCase} for non-Java-dependent tests
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class LightInspectionTestCase extends LightJavaInspectionTestCase {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.jetbrains.jsonSchema;
|
||||
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.util.ThreeState;
|
||||
import com.jetbrains.jsonSchema.settings.mappings.JsonSchemaPatternComparator;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -24,7 +24,7 @@ import org.junit.Assert;
|
||||
/**
|
||||
* @author Irina.Chernushina on 2/17/2016.
|
||||
*/
|
||||
public class JsonSchemaPatternComparatorTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class JsonSchemaPatternComparatorTest extends BasePlatformTestCase {
|
||||
public void testPatterns() {
|
||||
final JsonSchemaPatternComparator comparator = new JsonSchemaPatternComparator(getProject());
|
||||
Assert.assertEquals(ThreeState.YES, comparator.isSimilar(p("test"), p("test")));
|
||||
|
||||
@@ -4,9 +4,9 @@ package com.intellij.codeInsight.hints
|
||||
import com.intellij.codeInsight.hints.presentation.SpacePresentation
|
||||
import com.intellij.openapi.editor.EditorCustomElementRenderer
|
||||
import com.intellij.openapi.editor.Inlay
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
class InlayPassTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class InlayPassTest : BasePlatformTestCase() {
|
||||
private val noSettings = SettingsKey<NoSettings>("no")
|
||||
|
||||
fun testBlockAndInlineElementMayBeAtSameOffset() {
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.intellij.codeInsight.hints
|
||||
|
||||
import com.intellij.codeInsight.hints.presentation.*
|
||||
import com.intellij.openapi.editor.impl.EditorImpl
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import junit.framework.TestCase
|
||||
import java.awt.Point
|
||||
import java.awt.event.MouseEvent
|
||||
@@ -119,7 +119,7 @@ class PresentationTest : TestCase() {
|
||||
}
|
||||
}
|
||||
|
||||
class HeavyPresentationTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class HeavyPresentationTest : BasePlatformTestCase() {
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
myFixture.configureByText("__Dummy__.java", "class A {}")
|
||||
|
||||
+2
-2
@@ -17,14 +17,14 @@ package com.intellij.codeInspection;
|
||||
|
||||
import com.intellij.codeInspection.longLine.LongLineInspection;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @author Dmitry Batkovich
|
||||
*/
|
||||
public class LongLineInspectionTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class LongLineInspectionTest extends BasePlatformTestCase {
|
||||
|
||||
public void testShortLine() {
|
||||
doTest("java");
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.WriteAction;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.util.ProgressIndicatorUtils;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.Processor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit;
|
||||
/**
|
||||
* @author mikhail.sokolov
|
||||
*/
|
||||
public class MultiThreadSearchDeadlockTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MultiThreadSearchDeadlockTest extends BasePlatformTestCase {
|
||||
|
||||
private static final Collection<SEResultsEqualityProvider> ourEqualityProviders = Collections.singleton(new TrivialElementsEqualityProvider());
|
||||
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ package com.intellij.ide.actions.searcheverywhere;
|
||||
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.Processor;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
@@ -21,7 +21,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
/**
|
||||
* @author mikhail.sokolov
|
||||
*/
|
||||
public class MultiThreadSearchTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MultiThreadSearchTest extends BasePlatformTestCase {
|
||||
|
||||
private static final String MORE_ITEM = "...MORE";
|
||||
private static final Collection<SEResultsEqualityProvider> ourEqualityProviders = Collections.singleton(new TrivialElementsEqualityProvider());
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
package com.intellij.ide.actions.searcheverywhere;
|
||||
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.util.Processor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -15,7 +15,7 @@ import java.util.UUID;
|
||||
|
||||
import static com.intellij.ide.actions.searcheverywhere.SearchEverywhereUI.SearchListModel;
|
||||
|
||||
public class SearchModelTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class SearchModelTest extends BasePlatformTestCase {
|
||||
|
||||
private final static SearchEverywhereContributor<Object> STUB_CONTRIBUTOR_1 = createStubContributor(100);
|
||||
private final static SearchEverywhereContributor<Object> STUB_CONTRIBUTOR_2 = createStubContributor(200);
|
||||
|
||||
@@ -7,11 +7,11 @@ import com.intellij.ide.IdeEventQueue;
|
||||
import com.intellij.ide.impl.DataManagerImpl;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
import javax.swing.text.JTextComponent;
|
||||
|
||||
public abstract class AbstractFindInEditorTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public abstract class AbstractFindInEditorTest extends BasePlatformTestCase {
|
||||
protected void setTextToFind(String text) {
|
||||
EditorSearchSession editorSearchSession = getEditorSearchComponent();
|
||||
assertNotNull(editorSearchSession);
|
||||
|
||||
+2
-2
@@ -23,13 +23,13 @@ import com.intellij.openapi.editor.actionSystem.TypedAction;
|
||||
import com.intellij.openapi.editor.ex.EditorEx;
|
||||
import com.intellij.openapi.fileTypes.FileTypes;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author oleg
|
||||
*/
|
||||
public class SelectionQuotingTypedHandlerTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class SelectionQuotingTypedHandlerTest extends BasePlatformTestCase {
|
||||
|
||||
private boolean myPrevValue;
|
||||
|
||||
|
||||
+2
-2
@@ -18,10 +18,10 @@ package com.intellij.codeInsight.actions;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.junit.Assert;
|
||||
|
||||
public class ChangedLinesCounterTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class ChangedLinesCounterTest extends BasePlatformTestCase {
|
||||
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ import com.intellij.psi.PsiErrorElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.codeStyle.LanguageCodeStyleSettingsProvider;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.Assert;
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.*;
|
||||
|
||||
import static com.intellij.psi.codeStyle.LanguageCodeStyleSettingsProvider.SettingsType;
|
||||
|
||||
public class CodeSamplesCorrectnessTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class CodeSamplesCorrectnessTest extends BasePlatformTestCase {
|
||||
private List<CodeErrorReport> myErrorReports;
|
||||
private SettingsType[] mySettingValues;
|
||||
|
||||
|
||||
+2
-2
@@ -2,12 +2,12 @@
|
||||
package com.intellij.ide.highlighter.custom;
|
||||
|
||||
import com.intellij.testFramework.fixtures.CodeInsightTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class CustomFileTypeWordSelectionTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class CustomFileTypeWordSelectionTest extends BasePlatformTestCase {
|
||||
|
||||
public void testCustomFileTypeBraces() {
|
||||
doTest();
|
||||
|
||||
+2
-2
@@ -17,13 +17,13 @@ package com.intellij.openapi.editor.actions
|
||||
import com.intellij.ide.ClipboardSynchronizer
|
||||
import com.intellij.openapi.actionSystem.IdeActions
|
||||
import com.intellij.openapi.editor.LogicalPosition
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
import java.awt.datatransfer.StringSelection
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
class BlockSelectionTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
class BlockSelectionTest extends BasePlatformTestCase {
|
||||
|
||||
void "test paste tabs into block selection"() {
|
||||
myFixture.configureByText "a.txt", """\
|
||||
|
||||
+2
-2
@@ -16,9 +16,9 @@
|
||||
package com.intellij.openapi.editor.actions;
|
||||
|
||||
import com.intellij.openapi.actionSystem.IdeActions;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
public class EditorCloneCaretAboveBelowTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class EditorCloneCaretAboveBelowTest extends BasePlatformTestCase {
|
||||
public void testStoringDesiredXPosition() {
|
||||
init("long line<caret>\n" +
|
||||
"line\n" +
|
||||
|
||||
+2
-2
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.intellij.openapi.editor.actions;
|
||||
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
public class IndentSelectionActionTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class IndentSelectionActionTest extends BasePlatformTestCase {
|
||||
|
||||
public void testWithoutSelection() {
|
||||
verifyAction("some text",
|
||||
|
||||
+2
-2
@@ -10,9 +10,9 @@ import com.intellij.openapi.editor.actions.MoveToCaretStopTest.Direction.BACKWAR
|
||||
import com.intellij.openapi.editor.actions.MoveToCaretStopTest.Direction.FORWARD
|
||||
import com.intellij.openapi.editor.ex.EditorSettingsExternalizable
|
||||
import com.intellij.openapi.util.Comparing
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
class MoveToCaretStopTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class MoveToCaretStopTest : BasePlatformTestCase() {
|
||||
enum class Action { MOVE, DELETE }
|
||||
|
||||
enum class Direction : Comparator<Int> {
|
||||
|
||||
+2
-2
@@ -6,12 +6,12 @@ import com.intellij.openapi.editor.FoldRegion;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.fileTypes.ex.FileTypeManagerEx;
|
||||
import com.intellij.testFramework.EditorTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
public class NextPrevWordTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class NextPrevWordTest extends BasePlatformTestCase {
|
||||
|
||||
public void testNextWordFromPreLastPosition() {
|
||||
myFixture.configureByText("a.txt", "<foo<caret>>");
|
||||
|
||||
+2
-2
@@ -22,14 +22,14 @@ import com.intellij.openapi.editor.*;
|
||||
import com.intellij.openapi.fileTypes.FileTypes;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.testFramework.EditorTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.ui.LightweightHint;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class SelectUnselectOccurrenceActionsTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class SelectUnselectOccurrenceActionsTest extends BasePlatformTestCase {
|
||||
private int hintCount;
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -16,9 +16,9 @@
|
||||
package com.intellij.openapi.editor.actions;
|
||||
|
||||
import com.intellij.openapi.fileTypes.FileTypes;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
public class ToggleColumnModeActionMultiCaretTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class ToggleColumnModeActionMultiCaretTest extends BasePlatformTestCase {
|
||||
public void testSingleCaretWithoutSelection() {
|
||||
doTestToggleOnOff("line1\n" +
|
||||
"line<caret>2",
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.fileTypes.PlainTextFileType;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.awt.*;
|
||||
@@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public class DocumentMarkupModelTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class DocumentMarkupModelTest extends BasePlatformTestCase {
|
||||
public void testInfoTestAttributes() {
|
||||
LanguageExtensionPoint<Annotator> extension = new LanguageExtensionPoint<>();
|
||||
extension.language="TEXT";
|
||||
|
||||
+2
-2
@@ -22,11 +22,11 @@ import com.intellij.openapi.editor.EditorLastActionTracker;
|
||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
|
||||
import com.intellij.testFramework.fixtures.EditorMouseFixture;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class EditorLastActionTrackerTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class EditorLastActionTrackerTest extends BasePlatformTestCase {
|
||||
public static final String SAMPLE_ACTION = "EditorDelete";
|
||||
private final EditorActionHandler myActionHandler = new MyActionHandler();
|
||||
|
||||
|
||||
+2
-2
@@ -21,13 +21,13 @@ import com.intellij.openapi.editor.FoldingModel;
|
||||
import com.intellij.openapi.fileTypes.FileTypes;
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||||
import com.intellij.testFramework.EditorTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static com.intellij.openapi.editor.impl.DisplayedFoldingAnchor.Type;
|
||||
|
||||
public class FoldingAnchorsOverlayStrategyTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class FoldingAnchorsOverlayStrategyTest extends BasePlatformTestCase {
|
||||
public void testExpanded() {
|
||||
prepareEditor("<body><div>\n" +
|
||||
"</div><div>\n" +
|
||||
|
||||
+2
-2
@@ -4,12 +4,12 @@ import com.intellij.codeInsight.lookup.LookupManager;
|
||||
import com.intellij.openapi.actionSystem.IdeActions;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.RangeMarker;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @author cdr
|
||||
*/
|
||||
public class GuardBlockTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class GuardBlockTest extends BasePlatformTestCase {
|
||||
private RangeMarker createGuard(final int start, final int end) {
|
||||
final Document document = myFixture.getEditor().getDocument();
|
||||
return document.createGuardedBlock(start, end);
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ import com.intellij.openapi.ide.CopyPasteManager;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.io.FileUtilRt;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import junit.framework.ComparisonFailure;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class RichCopyTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class RichCopyTest extends BasePlatformTestCase {
|
||||
private static final String PLATFORM_SPECIFIC_PLACEHOLDER = "___PLATFORM_SPECIFIC___";
|
||||
|
||||
public void testNormalSelection() throws Exception {
|
||||
|
||||
+2
-2
@@ -29,13 +29,13 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiFileFactory;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.ui.JBColor;
|
||||
|
||||
/**
|
||||
* @author Denis Zhdanov
|
||||
*/
|
||||
public class SyntaxInfoConstructionTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class SyntaxInfoConstructionTest extends BasePlatformTestCase {
|
||||
public void testBlockSelection() {
|
||||
String text =
|
||||
"package org;\n" +
|
||||
|
||||
+2
-2
@@ -18,13 +18,13 @@ package com.intellij.openapi.fileTypes;
|
||||
import com.intellij.openapi.file.exclude.EnforcedPlainTextFileTypeFactory;
|
||||
import com.intellij.openapi.file.exclude.EnforcedPlainTextFileTypeManager;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
/**
|
||||
* @author Rustam Vishnyakov
|
||||
*/
|
||||
public class EnforcedPlaintTextFileTypeManagerTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class EnforcedPlaintTextFileTypeManagerTest extends BasePlatformTestCase {
|
||||
public void testMarkAsPlainText() {
|
||||
EnforcedPlainTextFileTypeManager manager = EnforcedPlainTextFileTypeManager.getInstance();
|
||||
VirtualFile file = myFixture.getTempDirFixture().createFile("test.java");
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ package com.intellij.openapi.project
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.progress.ProgressIndicator
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import com.intellij.util.TimeoutUtil
|
||||
import com.intellij.util.concurrency.Semaphore
|
||||
import com.intellij.util.ui.UIUtil
|
||||
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.NotNull
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
class DumbServiceImplTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
class DumbServiceImplTest extends BasePlatformTestCase {
|
||||
|
||||
void "test runWhenSmart is executed synchronously in smart mode"() {
|
||||
int invocations = 0
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
package com.intellij.patterns;
|
||||
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
public class VirtualFilePatternsTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class VirtualFilePatternsTest extends BasePlatformTestCase {
|
||||
public void testWithSuperParent() {
|
||||
VirtualFile file = myFixture.addFileToProject("foo/bar.txt", "").getVirtualFile();
|
||||
assert PlatformPatterns.virtualFile().withSuperParent(1, PlatformPatterns.virtualFile().withName("foo")).accepts(file);
|
||||
|
||||
@@ -12,8 +12,7 @@ import com.intellij.psi.impl.source.DummyHolder
|
||||
import com.intellij.psi.impl.source.codeStyle.CodeEditUtil
|
||||
import com.intellij.psi.impl.source.tree.*
|
||||
import com.intellij.psi.tree.IElementType
|
||||
import com.intellij.testFramework.LightPlatformTestCase
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.jetbrains.jetCheck.Generator
|
||||
import org.jetbrains.jetCheck.ImperativeCommand
|
||||
import org.jetbrains.jetCheck.IntDistribution
|
||||
@@ -22,7 +21,7 @@ import org.jetbrains.jetCheck.PropertyChecker
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
class PsiEventConsistencyTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class PsiEventConsistencyTest : BasePlatformTestCase() {
|
||||
|
||||
fun `test replacing child after changing its subtree`() {
|
||||
WriteCommandAction.runWriteCommandAction(project) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiLanguageInjectionHost;
|
||||
import com.intellij.psi.impl.source.tree.CompositeElement;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import gnu.trove.THashMap;
|
||||
import gnu.trove.TObjectIntHashMap;
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.*;
|
||||
/**
|
||||
* @author gregsh
|
||||
*/
|
||||
public class IElementTypeTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class IElementTypeTest extends BasePlatformTestCase {
|
||||
// load all parser definitions, instantiate all lexers & parsers to initialize all IElementType constants
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public void testCount() {
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.intellij.openapi.util.SimpleModificationTracker;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.impl.PsiModificationTrackerImpl;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.util.TimeoutUtil;
|
||||
import junit.framework.TestCase;
|
||||
import one.util.streamex.IntStreamEx;
|
||||
@@ -22,7 +22,7 @@ import java.util.function.Supplier;
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
public class CachedValuesTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class CachedValuesTest extends BasePlatformTestCase {
|
||||
private final UserDataHolderBase holder = new UserDataHolderBase();
|
||||
|
||||
public void testCachedValueCapturingInvalidStuff() {
|
||||
|
||||
+2
-2
@@ -18,14 +18,14 @@ package com.intellij.structureView;
|
||||
import com.intellij.ide.util.treeView.smartTree.*;
|
||||
import com.intellij.openapi.ui.Queryable;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
public class SmartTreeStructureTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class SmartTreeStructureTest extends BasePlatformTestCase {
|
||||
private final Queryable.PrintInfo myPrintInfo = new Queryable.PrintInfo();
|
||||
private TestTreeModel myModel;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import com.intellij.psi.impl.source.PsiFileImpl;
|
||||
import com.intellij.testFramework.LeakHunter;
|
||||
import com.intellij.testFramework.LightPlatformTestCase;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.usageView.UsageInfo;
|
||||
import com.intellij.usages.*;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
@@ -48,7 +48,7 @@ import javax.swing.tree.TreeNode;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class UsageViewTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class UsageViewTest extends BasePlatformTestCase {
|
||||
public void testUsageViewDoesNotHoldPsiFilesOrDocuments() {
|
||||
// sick and tired of hunting tests leaking documents
|
||||
((UndoManagerImpl)UndoManager.getInstance(getProject())).flushCurrentCommandMerger();
|
||||
|
||||
@@ -5,9 +5,9 @@ import com.intellij.openapi.util.ThrowableComputable;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.psi.impl.source.PsiFileImpl;
|
||||
import com.intellij.testFramework.exceptionCases.AbstractExceptionCase;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
public class AstLoadingFilterTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class AstLoadingFilterTest extends BasePlatformTestCase {
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
|
||||
@@ -18,11 +18,11 @@ package com.intellij.util;
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.Assert;
|
||||
|
||||
public class PsiErrorElementUtilTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class PsiErrorElementUtilTest extends BasePlatformTestCase {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
|
||||
@@ -6,13 +6,13 @@ import com.intellij.openapi.fileTypes.ex.FakeFileType;
|
||||
import com.intellij.openapi.fileTypes.ex.FileTypeManagerEx;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.search.FileTypeIndexImpl;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public class FileTypeIndexTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class FileTypeIndexTest extends BasePlatformTestCase {
|
||||
|
||||
public void testAddFileType() {
|
||||
addAndRemoveFileType();
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.util.TimeoutUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.indexing.FileBasedIndex;
|
||||
@@ -26,7 +26,7 @@ import java.util.concurrent.Future;
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public class PersistencePerformanceTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class PersistencePerformanceTest extends BasePlatformTestCase {
|
||||
private final List<PersistentHashMap<String, Record>> myMaps = new ArrayList<>();
|
||||
private final List<String> myKeys = new ArrayList<>();
|
||||
private PersistentStringEnumerator myEnumerator;
|
||||
|
||||
+2
-2
@@ -22,14 +22,14 @@ import com.intellij.openapi.roots.ModuleRootModificationUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* @author Roman Chernyatchik
|
||||
*/
|
||||
public class FileUrlLocationTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class FileUrlLocationTest extends BasePlatformTestCase {
|
||||
public void testExcluded() {
|
||||
myFixture.addFileToProject("secondary/my_example_spec.xml", "");
|
||||
ModuleRootModificationUtil.updateExcludedFolders(getModule(), ModuleRootManager.getInstance(getModule()).getContentRoots()[0], Collections.emptyList(), Collections.singletonList("/src"));
|
||||
|
||||
+2
-2
@@ -18,10 +18,10 @@ package com.intellij.codeInsight.folding.impl;
|
||||
import com.intellij.codeInsight.folding.CodeFoldingManager;
|
||||
import com.intellij.openapi.editor.FoldRegion;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public abstract class AbstractFoldingPolicyTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public abstract class AbstractFoldingPolicyTest extends BasePlatformTestCase {
|
||||
protected void doTest(@NotNull String text, @NotNull String ext) {
|
||||
myFixture.configureByText("test." + ext, text);
|
||||
|
||||
|
||||
+2
-2
@@ -6,11 +6,11 @@ import com.intellij.openapi.editor.FoldRegion;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
abstract class AbstractPsiNamesElementSignatureProviderTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
abstract class AbstractPsiNamesElementSignatureProviderTest extends BasePlatformTestCase {
|
||||
void doTest(@NotNull String text, @NotNull String ext) {
|
||||
myFixture.configureByText("test." + ext, text);
|
||||
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ import com.intellij.psi.codeStyle.arrangement.match.StdArrangementMatchRule;
|
||||
import com.intellij.psi.codeStyle.arrangement.model.ArrangementAtomMatchCondition;
|
||||
import com.intellij.psi.codeStyle.arrangement.model.ArrangementMatchCondition;
|
||||
import com.intellij.psi.codeStyle.arrangement.std.*;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -33,7 +33,7 @@ import static com.intellij.psi.codeStyle.arrangement.std.StdArrangementTokens.Or
|
||||
/**
|
||||
* @author Denis Zhdanov
|
||||
*/
|
||||
public abstract class AbstractRearrangerTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public abstract class AbstractRearrangerTest extends BasePlatformTestCase {
|
||||
private static final RichTextHandler[] RICH_TEXT_HANDLERS = {new RangeHandler(), new FoldingHandler()};
|
||||
private static final Pattern ATTRIBUTE_PATTERN = Pattern.compile("([^\\s]+)=([^\\s]+)");
|
||||
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.JDOMUtil;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.ui.docking.DockContainer;
|
||||
import com.intellij.ui.docking.DockManager;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
@@ -32,7 +32,7 @@ import java.util.concurrent.TimeoutException;
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public abstract class FileEditorManagerTestCase extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public abstract class FileEditorManagerTestCase extends BasePlatformTestCase {
|
||||
protected FileEditorManagerImpl myManager;
|
||||
private FileEditorManager myOldManager;
|
||||
private Set<DockContainer> myOldDockContainers;
|
||||
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.testFramework.fixtures;
|
||||
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiFileFactory;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.testFramework.fixtures.impl.LightTempDirTestFixtureImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
public abstract class BasePlatformTestCase extends UsefulTestCase {
|
||||
protected CodeInsightTestFixture myFixture;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
IdeaTestFixtureFactory factory = IdeaTestFixtureFactory.getFixtureFactory();
|
||||
TestFixtureBuilder<IdeaProjectTestFixture> fixtureBuilder = factory.createLightFixtureBuilder(getProjectDescriptor());
|
||||
IdeaProjectTestFixture fixture = fixtureBuilder.getFixture();
|
||||
|
||||
TempDirTestFixture tempDirFixture = createTempDirTestFixture();
|
||||
myFixture = IdeaTestFixtureFactory.getFixtureFactory().createCodeInsightFixture(fixture, tempDirFixture);
|
||||
|
||||
myFixture.setTestDataPath(getTestDataPath());
|
||||
myFixture.setUp();
|
||||
}
|
||||
|
||||
protected TempDirTestFixture createTempDirTestFixture() {
|
||||
IdeaTestExecutionPolicy policy = IdeaTestExecutionPolicy.current();
|
||||
return policy != null
|
||||
? policy.createTempDirTestFixture()
|
||||
: new LightTempDirTestFixtureImpl(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
try {
|
||||
myFixture.tearDown();
|
||||
}
|
||||
catch (Throwable e) {
|
||||
addSuppressedException(e);
|
||||
}
|
||||
finally {
|
||||
myFixture = null;
|
||||
super.tearDown();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns relative path to the test data.
|
||||
*/
|
||||
protected String getBasePath() {
|
||||
return "";
|
||||
}
|
||||
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return absolute path to the test data. Not intended to be overridden in tests written as part of the IntelliJ IDEA codebase;
|
||||
* must be overridden in plugins which use the test framework.
|
||||
*
|
||||
* @see #getBasePath()
|
||||
*/
|
||||
protected String getTestDataPath() {
|
||||
String path = isCommunity() ? PlatformTestUtil.getCommunityPath() : IdeaTestExecutionPolicy.getHomePathWithPolicy();
|
||||
return StringUtil.trimEnd(FileUtil.toSystemIndependentName(path), "/") + '/' +
|
||||
StringUtil.trimStart(FileUtil.toSystemIndependentName(getBasePath()), "/");
|
||||
}
|
||||
|
||||
protected boolean isCommunity() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runTest() throws Throwable {
|
||||
if (isWriteActionRequired()) {
|
||||
WriteCommandAction.writeCommandAction(getProject()).run(() -> doRunTests());
|
||||
}
|
||||
else {
|
||||
doRunTests();
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isWriteActionRequired() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void doRunTests() throws Throwable {
|
||||
super.runTest();
|
||||
}
|
||||
|
||||
protected Project getProject() {
|
||||
return myFixture.getProject();
|
||||
}
|
||||
|
||||
protected PsiManager getPsiManager() {
|
||||
return PsiManager.getInstance(getProject());
|
||||
}
|
||||
|
||||
protected PsiFile createLightFile(FileType fileType, String text) {
|
||||
return PsiFileFactory.getInstance(getProject()).createFileFromText("a." + fileType.getDefaultExtension(), fileType, text);
|
||||
}
|
||||
|
||||
public PsiFile createLightFile(String fileName, Language language, String text) {
|
||||
return PsiFileFactory.getInstance(getProject()).createFileFromText(fileName, language, text, false, true);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected Module getModule() {
|
||||
return myFixture.getModule();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -14,7 +14,7 @@ import org.junit.runners.model.Statement;
|
||||
* @author gregsh
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public abstract class LightPlatformCodeInsightFixture4TestCase extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public abstract class LightPlatformCodeInsightFixture4TestCase extends BasePlatformTestCase {
|
||||
@Rule
|
||||
public TestRule rule = (base, description) -> new Statement() {
|
||||
@Override
|
||||
|
||||
+5
-123
@@ -1,127 +1,9 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.testFramework.fixtures;
|
||||
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiFileFactory;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.testFramework.fixtures.impl.LightTempDirTestFixtureImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
* @deprecated Please use {@link BasePlatformTestCase}
|
||||
*/
|
||||
public abstract class LightPlatformCodeInsightFixtureTestCase extends UsefulTestCase {
|
||||
protected CodeInsightTestFixture myFixture;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
IdeaTestFixtureFactory factory = IdeaTestFixtureFactory.getFixtureFactory();
|
||||
TestFixtureBuilder<IdeaProjectTestFixture> fixtureBuilder = factory.createLightFixtureBuilder(getProjectDescriptor());
|
||||
IdeaProjectTestFixture fixture = fixtureBuilder.getFixture();
|
||||
|
||||
TempDirTestFixture tempDirFixture = createTempDirTestFixture();
|
||||
myFixture = IdeaTestFixtureFactory.getFixtureFactory().createCodeInsightFixture(fixture, tempDirFixture);
|
||||
|
||||
myFixture.setTestDataPath(getTestDataPath());
|
||||
myFixture.setUp();
|
||||
}
|
||||
|
||||
protected TempDirTestFixture createTempDirTestFixture() {
|
||||
IdeaTestExecutionPolicy policy = IdeaTestExecutionPolicy.current();
|
||||
return policy != null
|
||||
? policy.createTempDirTestFixture()
|
||||
: new LightTempDirTestFixtureImpl(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
try {
|
||||
myFixture.tearDown();
|
||||
}
|
||||
catch (Throwable e) {
|
||||
addSuppressedException(e);
|
||||
}
|
||||
finally {
|
||||
myFixture = null;
|
||||
super.tearDown();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns relative path to the test data.
|
||||
*/
|
||||
protected String getBasePath() {
|
||||
return "";
|
||||
}
|
||||
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return absolute path to the test data. Not intended to be overridden in tests written as part of the IntelliJ IDEA codebase;
|
||||
* must be overridden in plugins which use the test framework.
|
||||
*
|
||||
* @see #getBasePath()
|
||||
*/
|
||||
protected String getTestDataPath() {
|
||||
String path = isCommunity() ? PlatformTestUtil.getCommunityPath() : IdeaTestExecutionPolicy.getHomePathWithPolicy();
|
||||
return StringUtil.trimEnd(FileUtil.toSystemIndependentName(path), "/") + '/' +
|
||||
StringUtil.trimStart(FileUtil.toSystemIndependentName(getBasePath()), "/");
|
||||
}
|
||||
|
||||
protected boolean isCommunity() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runTest() throws Throwable {
|
||||
if (isWriteActionRequired()) {
|
||||
WriteCommandAction.writeCommandAction(getProject()).run(() -> doRunTests());
|
||||
}
|
||||
else {
|
||||
doRunTests();
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isWriteActionRequired() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void doRunTests() throws Throwable {
|
||||
super.runTest();
|
||||
}
|
||||
|
||||
protected Project getProject() {
|
||||
return myFixture.getProject();
|
||||
}
|
||||
|
||||
protected PsiManager getPsiManager() {
|
||||
return PsiManager.getInstance(getProject());
|
||||
}
|
||||
|
||||
protected PsiFile createLightFile(FileType fileType, String text) {
|
||||
return PsiFileFactory.getInstance(getProject()).createFileFromText("a." + fileType.getDefaultExtension(), fileType, text);
|
||||
}
|
||||
|
||||
public PsiFile createLightFile(String fileName, Language language, String text) {
|
||||
return PsiFileFactory.getInstance(getProject()).createFileFromText(fileName, language, text, false, true);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected Module getModule() {
|
||||
return myFixture.getModule();
|
||||
}
|
||||
}
|
||||
@Deprecated
|
||||
public abstract class LightPlatformCodeInsightFixtureTestCase extends BasePlatformTestCase {
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,12 +6,12 @@ import com.intellij.codeInspection.ProblemHighlightType;
|
||||
import com.intellij.codeInspection.ProblemsHolder;
|
||||
import com.intellij.psi.PsiElementVisitor;
|
||||
import com.intellij.psi.PsiPlainText;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.ComparisonFailure;
|
||||
|
||||
public class ExpectedHighlightingDataFunctionalTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class ExpectedHighlightingDataFunctionalTest extends BasePlatformTestCase {
|
||||
|
||||
public void testExpectedWarning() {
|
||||
doTest("<warning descr=\"Magic problem\">just some text</warning>", new MySimpleInspection());
|
||||
|
||||
@@ -3,9 +3,9 @@ package org.editorconfig.language
|
||||
|
||||
import com.intellij.codeInsight.generation.actions.CommentByLineCommentAction
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
class EditorConfigCommenterTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigCommenterTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/commenter/"
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.openapi.command.WriteCommandAction
|
||||
import com.intellij.psi.codeStyle.CodeStyleManager
|
||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
class EditorConfigFormattingTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigFormattingTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() = "${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/formatting"
|
||||
|
||||
private fun doTestWithSettings(settings: CommonCodeStyleSettings.() -> Unit) {
|
||||
|
||||
+2
-2
@@ -4,13 +4,13 @@ package org.editorconfig.language.codeinsight
|
||||
import com.intellij.codeInsight.lookup.LookupElement
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.editorconfig.EditorConfigRegistry
|
||||
import org.editorconfig.language.assertIterableEquals
|
||||
import org.editorconfig.language.services.EditorConfigOptionDescriptorManager
|
||||
import org.editorconfig.language.services.impl.EditorConfigOptionDescriptorManagerImpl
|
||||
|
||||
class EditorConfigCompletionTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigCompletionTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/codeinsight/completion/"
|
||||
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
package org.editorconfig.language.codeinsight
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
class EditorConfigFoldingBuilderTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigFoldingBuilderTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/codeinsight/folding/"
|
||||
|
||||
|
||||
+2
-2
@@ -5,9 +5,9 @@ import com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPassFactory.doW
|
||||
import com.intellij.codeInsight.daemon.impl.SeveritiesProvider
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.ExpectedHighlightingData
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
class EditorConfigHighlightUsagesTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigHighlightUsagesTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/codeinsight/highlightUsages/"
|
||||
|
||||
|
||||
+2
-2
@@ -3,11 +3,11 @@ package org.editorconfig.language.codeinsight
|
||||
|
||||
import com.intellij.codeInspection.LocalInspectionTool
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.editorconfig.language.codeinsight.inspections.*
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
class EditorConfigInspectionsTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigInspectionsTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/codeinsight/inspections"
|
||||
|
||||
|
||||
+2
-2
@@ -4,13 +4,13 @@ package org.editorconfig.language.codeinsight
|
||||
import com.intellij.codeInsight.intention.IntentionAction
|
||||
import com.intellij.codeInspection.LocalInspectionTool
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.editorconfig.language.codeinsight.inspections.*
|
||||
import org.editorconfig.language.messages.EditorConfigBundle
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
class EditorConfigQuickfixesTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigQuickfixesTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/codeinsight/quickfixes/"
|
||||
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ package org.editorconfig.language.codeinsight
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.CodeInsightTestUtil
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.editorconfig.language.codeinsight.refactoring.EditorConfigRenameHandler
|
||||
|
||||
class EditorConfigRefactoringTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigRefactoringTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/codeinsight/refactoring/"
|
||||
|
||||
|
||||
+2
-2
@@ -8,10 +8,10 @@ import com.intellij.psi.PsiFile
|
||||
import com.intellij.psi.PsiReference
|
||||
import com.intellij.psi.util.PsiUtilCore
|
||||
import com.intellij.testFramework.UsefulTestCase
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import java.util.*
|
||||
|
||||
class EditorConfigResolveTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigResolveTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/codeinsight/resolve/"
|
||||
|
||||
|
||||
+2
-2
@@ -3,11 +3,11 @@ package org.editorconfig.language.codeinsight.actions
|
||||
|
||||
import com.intellij.codeInsight.intention.IntentionAction
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.editorconfig.language.messages.EditorConfigBundle
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
class EditorConfigIntentionTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigIntentionTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/codeinsight/actions/intention/"
|
||||
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
package org.editorconfig.language.codeinsight.actions
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
class EnterInEditorConfigFileHandlerTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EnterInEditorConfigFileHandlerTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/codeinsight/actions/enter/"
|
||||
|
||||
|
||||
+2
-2
@@ -2,12 +2,12 @@
|
||||
package org.editorconfig.language.headers
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.editorconfig.language.services.EditorConfigElementFactory
|
||||
import org.editorconfig.language.util.isSubcaseOf
|
||||
import org.junit.Test
|
||||
|
||||
class EditorConfigGlobUtilTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigGlobUtilTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/globs/"
|
||||
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
package org.editorconfig.language.headers
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.editorconfig.language.assertIterableEquals
|
||||
import org.editorconfig.language.psi.EditorConfigPsiFile
|
||||
import org.editorconfig.language.psi.EditorConfigSection
|
||||
@@ -10,7 +10,7 @@ import org.editorconfig.language.util.headers.EditorConfigHeaderOverrideSearcher
|
||||
import org.editorconfig.language.util.headers.EditorConfigOverriddenHeaderSearcher
|
||||
import org.editorconfig.language.util.headers.EditorConfigOverridingHeaderSearcher
|
||||
|
||||
class EditorConfigHeaderHierarchyTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigHeaderHierarchyTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/headers/"
|
||||
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
package org.editorconfig.language.highlighting
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
class EditorConfigErrorHighlightingTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigErrorHighlightingTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/highlighting/error/"
|
||||
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
package org.editorconfig.language.highlighting
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
|
||||
class EditorConfigInfoHighlightingTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class EditorConfigInfoHighlightingTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath() =
|
||||
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testData/org/editorconfig/language/highlighting/info/"
|
||||
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ package org.jetbrains.plugins.gradle.integrations.maven.codeInsight.actions;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.CodeInsightTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.jetbrains.idea.maven.model.MavenId;
|
||||
|
||||
import java.io.File;
|
||||
@@ -13,7 +13,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* @author Vladislav.Soroka
|
||||
*/
|
||||
public class AddGradleDslDependencyActionTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class AddGradleDslDependencyActionTest extends BasePlatformTestCase {
|
||||
|
||||
public void testAddMavenDependencyInEmptyFile() {
|
||||
AddGradleDslDependencyAction.TEST_THREAD_LOCAL.set(Arrays.asList(new MavenId("testGroupId", "testArtifactId", "1.0")));
|
||||
|
||||
+2
-2
@@ -18,14 +18,14 @@ package org.jetbrains.plugins.gradle.codeInsight.actions;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.fixtures.CodeInsightTestUtil;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @author Vladislav.Soroka
|
||||
*/
|
||||
public class AddGradleDslPluginActionTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class AddGradleDslPluginActionTest extends BasePlatformTestCase {
|
||||
|
||||
public void testApplyPlugin() {
|
||||
doTest("testApplyPlugin.gradle", "java");
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import com.intellij.psi.PsiElement;
|
||||
import com.intellij.spellchecker.LiteralExpressionTokenizer;
|
||||
import com.intellij.spellchecker.inspections.Splitter;
|
||||
import com.intellij.spellchecker.tokenizer.TokenConsumer;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.util.Consumer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class LiteralExpressionTokenizerTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class LiteralExpressionTokenizerTest extends BasePlatformTestCase {
|
||||
private static class TokenCollector extends TokenConsumer implements Consumer<TextRange> {
|
||||
private final List<String> myTokenTexts = new ArrayList<>();
|
||||
private String myText;
|
||||
|
||||
@@ -3,7 +3,7 @@ package org.intellij.plugins.markdown;
|
||||
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.plugins.markdown.injection.LanguageGuesser;
|
||||
import org.intellij.plugins.markdown.lang.MarkdownFileType;
|
||||
import org.intellij.plugins.markdown.lang.MarkdownLanguage;
|
||||
@@ -12,7 +12,7 @@ import org.intellij.plugins.markdown.settings.MarkdownApplicationSettings;
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class MarkdownInjectionTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MarkdownInjectionTest extends BasePlatformTestCase {
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
|
||||
+2
-2
@@ -2,11 +2,11 @@
|
||||
package org.intellij.plugins.markdown.braces;
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightSettings;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.plugins.markdown.lang.MarkdownFileType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class MarkdownBraceMatcherTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MarkdownBraceMatcherTest extends BasePlatformTestCase {
|
||||
public void testParenBeforeIdentifier() {
|
||||
doTest('(', "<caret>abc", "(abc");
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package org.intellij.plugins.markdown.completion
|
||||
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.intellij.plugins.markdown.MarkdownTestingUtil
|
||||
|
||||
class HeaderReferenceCompletionTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class HeaderReferenceCompletionTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath(): String = MarkdownTestingUtil.TEST_DATA_PATH + "/completion/headerAnchor/"
|
||||
|
||||
fun testHeader1() {
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ import com.intellij.lang.Language;
|
||||
import com.intellij.lang.LanguageParserDefinitions;
|
||||
import com.intellij.openapi.fileTypes.PlainTextLanguage;
|
||||
import com.intellij.openapi.fileTypes.PlainTextParserDefinition;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.plugins.markdown.MarkdownTestingUtil;
|
||||
import org.intellij.plugins.markdown.injection.CodeFenceLanguageProvider;
|
||||
import org.intellij.plugins.markdown.injection.LanguageGuesser;
|
||||
@@ -21,7 +21,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class LanguageListCompletionTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class LanguageListCompletionTest extends BasePlatformTestCase {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.intellij.plugins.markdown.editor
|
||||
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import org.intellij.plugins.markdown.MarkdownTestingUtil
|
||||
import org.intellij.plugins.markdown.settings.MarkdownApplicationSettings
|
||||
|
||||
class MarkdownCodeFenceErrorHighlightingTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class MarkdownCodeFenceErrorHighlightingTest : BasePlatformTestCase() {
|
||||
private var oldHideErrorsSetting = false
|
||||
|
||||
override fun setUp() {
|
||||
|
||||
+2
-2
@@ -18,11 +18,11 @@ import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.plugins.markdown.lang.MarkdownFileType;
|
||||
import org.intellij.plugins.markdown.lang.psi.impl.MarkdownCodeFenceImpl;
|
||||
|
||||
public class MarkdownManipulatorTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MarkdownManipulatorTest extends BasePlatformTestCase {
|
||||
public void testSimpleCodeFence() {
|
||||
doTest("```text\n" +
|
||||
"Runti<caret>me\n" +
|
||||
|
||||
+2
-2
@@ -15,13 +15,13 @@ package org.intellij.plugins.markdown.editor;
|
||||
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.plugins.markdown.lang.psi.MarkdownPsiElementFactory;
|
||||
import org.intellij.plugins.markdown.lang.psi.impl.MarkdownCodeFenceImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class MarkdownPsiElementFactoryTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MarkdownPsiElementFactoryTest extends BasePlatformTestCase {
|
||||
public void testCreateNewCodeFence() {
|
||||
doTest("ruby", "a = 1", "```ruby\na = 1\n```");
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
package org.intellij.plugins.markdown.editor;
|
||||
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.plugins.markdown.lang.psi.impl.MarkdownFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class MarkdownQuoteHandlerTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MarkdownQuoteHandlerTest extends BasePlatformTestCase {
|
||||
private void doTest(@NotNull String text, char charToType, @NotNull String expectedResult) {
|
||||
final PsiFile file = myFixture.configureByText("test.md", text);
|
||||
assertInstanceOf(file, MarkdownFile.class);
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.intellij.plugins.markdown.enter;
|
||||
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.plugins.markdown.MarkdownTestingUtil;
|
||||
|
||||
public class MarkdownEnterHandlerTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MarkdownEnterHandlerTest extends BasePlatformTestCase {
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return MarkdownTestingUtil.TEST_DATA_PATH + "/enter";
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package org.intellij.plugins.markdown.folding;
|
||||
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.plugins.markdown.MarkdownTestingUtil;
|
||||
|
||||
public class MarkdownFoldingTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MarkdownFoldingTest extends BasePlatformTestCase {
|
||||
public void testOrderedList() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,11 +3,11 @@ package org.intellij.plugins.markdown.html
|
||||
|
||||
import com.intellij.lang.html.HTMLLanguage
|
||||
import com.intellij.psi.impl.DebugUtil
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import junit.framework.TestCase
|
||||
import org.intellij.plugins.markdown.MarkdownTestingUtil
|
||||
|
||||
class MarkdownEmbeddedHtmlTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
class MarkdownEmbeddedHtmlTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath(): String {
|
||||
return MarkdownTestingUtil.TEST_DATA_PATH + "/html/embedded/"
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
package org.intellij.plugins.markdown.html;
|
||||
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import org.intellij.plugins.markdown.MarkdownTestingUtil;
|
||||
import org.intellij.plugins.markdown.ui.preview.MarkdownUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class MarkdownHtmlGenerationTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MarkdownHtmlGenerationTest extends BasePlatformTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ package org.intellij.plugins.markdown.html;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.testFramework.fixtures.IdeaTestFixtureFactory;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
|
||||
import com.intellij.testFramework.fixtures.TempDirTestFixture;
|
||||
import org.intellij.plugins.markdown.MarkdownTestingUtil;
|
||||
import org.intellij.plugins.markdown.settings.MarkdownSettingsConfigurable;
|
||||
@@ -13,7 +13,7 @@ import org.intellij.plugins.markdown.ui.preview.MarkdownUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class MarkdownPlantUMLTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
public class MarkdownPlantUMLTest extends BasePlatformTestCase {
|
||||
private static final String PLANTUML_TARGET_DIR = "plantuml";
|
||||
protected TempDirTestFixture myFixture;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user