Specify test runners for IDE tests
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2010-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/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.test
|
||||
|
||||
import org.junit.internal.runners.JUnit38ClassRunner
|
||||
import org.junit.runners.BlockJUnit4ClassRunner
|
||||
|
||||
class JUnit3WithIdeaConfigurationRunner(klass: Class<*>?) : JUnit38ClassRunner(klass) {
|
||||
|
||||
companion object {
|
||||
init {
|
||||
IdeaSystemPropertiesForParallelRunConfigurator.setProperties()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class JUnit4WithIdeaConfigurationRunner(klass: Class<*>?) : BlockJUnit4ClassRunner(klass) {
|
||||
|
||||
companion object {
|
||||
init {
|
||||
IdeaSystemPropertiesForParallelRunConfigurator.setProperties()
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
@@ -10,7 +10,10 @@ import com.intellij.testFramework.LightProjectDescriptor
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.KotlinFileType
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class SmartEnterCompletionTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
|
||||
fun testBasic() {
|
||||
|
||||
+3
@@ -23,11 +23,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.completion.test.CompletionTestUtilKt;
|
||||
import org.jetbrains.kotlin.idea.test.TestUtilsKt;
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class KotlinConfidenceTest extends LightCompletionTestCase {
|
||||
private static final String TYPE_DIRECTIVE_PREFIX = "// TYPE:";
|
||||
private final ThreadLocal<Boolean> skipComplete = ThreadLocal.withInitial(() -> false);
|
||||
|
||||
+5
-1
@@ -8,9 +8,13 @@ package org.jetbrains.kotlin.completion.handlers
|
||||
import com.intellij.codeInsight.completion.CompletionType
|
||||
import org.jetbrains.kotlin.idea.completion.test.COMPLETION_TEST_DATA_BASE_PATH
|
||||
import org.jetbrains.kotlin.idea.completion.test.handlers.CompletionHandlerTestBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@Deprecated("All tests from here to be moved to the generated test") class BasicCompletionHandlerTest : CompletionHandlerTestBase(){
|
||||
@Deprecated("All tests from here to be moved to the generated test")
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class BasicCompletionHandlerTest : CompletionHandlerTestBase(){
|
||||
private fun checkResult(){
|
||||
fixture.checkResultByFile(getTestName(false) + ".kt.after")
|
||||
}
|
||||
|
||||
+3
@@ -7,8 +7,11 @@ package org.jetbrains.kotlin.idea.completion.test.handlers
|
||||
|
||||
import org.jetbrains.kotlin.idea.completion.test.COMPLETION_TEST_DATA_BASE_PATH
|
||||
import org.jetbrains.kotlin.idea.completion.test.KotlinCompletionTestCase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class CompletionMultiFileHandlerTest : KotlinCompletionTestCase() {
|
||||
fun testExtensionFunctionImport() {
|
||||
doTest()
|
||||
|
||||
+3
-1
@@ -7,9 +7,11 @@ package org.jetbrains.kotlin.idea.completion.test.handlers;
|
||||
|
||||
import org.jetbrains.kotlin.idea.completion.test.CompletionTestUtilKt;
|
||||
import org.jetbrains.kotlin.idea.completion.test.KotlinCompletionTestCase;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class JavaCompletionHandlerTest extends KotlinCompletionTestCase {
|
||||
public void testClassAutoImport() {
|
||||
doTest();
|
||||
|
||||
+3
@@ -10,8 +10,11 @@ import com.intellij.codeInsight.lookup.LookupElement
|
||||
import com.intellij.codeInsight.lookup.LookupElementPresentation
|
||||
import org.jetbrains.kotlin.idea.completion.test.COMPLETION_TEST_DATA_BASE_PATH
|
||||
import org.jetbrains.kotlin.idea.completion.test.KotlinCompletionTestCase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class SmartCompletionMultifileHandlerTest : KotlinCompletionTestCase() {
|
||||
fun testImportExtensionFunction() { doTest() }
|
||||
|
||||
|
||||
+3
@@ -9,8 +9,11 @@ import com.intellij.codeInsight.template.TemplateContextType
|
||||
import com.intellij.testFramework.UsefulTestCase
|
||||
import org.jetbrains.kotlin.idea.liveTemplates.KotlinTemplateContextType.*
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class LiveTemplatesContextTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getTestDataPath(): String =
|
||||
File(TEST_DATA_BASE_PATH, "/context").path + File.separator
|
||||
|
||||
+3
@@ -18,9 +18,12 @@ import junit.framework.TestCase
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class LiveTemplatesTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
|
||||
@@ -12,8 +12,11 @@ import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.psi.KtClass
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinLightClassInheritorTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
fun testAnnotation() {
|
||||
doTestInheritorByText("annotation class A", "java.lang.annotation.Annotation", false)
|
||||
|
||||
@@ -19,7 +19,10 @@ import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.psi.KtClass
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KtFileLightClassTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor = KotlinLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -23,7 +23,10 @@ import org.jetbrains.kotlin.idea.facet.configureFacet
|
||||
import org.jetbrains.kotlin.idea.facet.getOrCreateFacet
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KtLightAnnotationTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
@@ -16,8 +16,11 @@ import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
// see KtFileLightClassTest
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class LightClassFromTextTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -13,10 +13,13 @@ import org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration
|
||||
import org.jetbrains.kotlin.idea.caches.lightClasses.KtLightClassForDecompiledDeclaration
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
import kotlin.test.assertNotNull
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class LightClassesClasspathSortingTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
|
||||
fun testExplicitClass() {
|
||||
|
||||
@@ -6,37 +6,33 @@
|
||||
package org.jetbrains.kotlin.findUsages
|
||||
|
||||
import org.jetbrains.kotlin.idea.multiplatform.setupMppProjectFromDirStructure
|
||||
import org.junit.Test
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class FindUsagesMultiModuleTest : AbstractFindUsagesMultiModuleTest() {
|
||||
|
||||
@Test
|
||||
fun testFindActualInterface() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testFindCommonClassFromActual() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testFindCommonFromActual() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testFindCommonPropertyFromActual() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testFindCommonSuperclass() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testFindImplFromHeader() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@ package org.jetbrains.kotlin.findUsages
|
||||
import com.intellij.psi.search.FilenameIndex
|
||||
import org.jetbrains.kotlin.psi.KtParameter
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinFindUsagesWithLibraryCustomTest : AbstractKotlinFindUsagesWithLibraryTest() {
|
||||
fun testFindUsagesForLocalClassProperty() {
|
||||
val libraryFile = FilenameIndex.getFilesByName(getProject(), "library.kt", myFixture.module.moduleWithLibrariesScope).first()
|
||||
|
||||
@@ -13,7 +13,10 @@ import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
import org.jetbrains.kotlin.resolve.scopes.utils.findClassifier
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class DummyFileResolveCachingTest : LightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -11,10 +11,13 @@ import com.intellij.openapi.util.io.FileUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.kotlin.test.HierarchyViewTestFixture;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public abstract class KotlinHierarchyViewTestBase extends KotlinLightCodeInsightFixtureTestCase {
|
||||
private final HierarchyViewTestFixture hierarchyFixture = new HierarchyViewTestFixture();
|
||||
|
||||
|
||||
@@ -11,8 +11,11 @@ import com.intellij.testFramework.LightProjectDescriptor
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class RegisteredFindersTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor = LightCodeInsightFixtureTestCase.JAVA_LATEST
|
||||
|
||||
|
||||
@@ -25,9 +25,12 @@ import org.jetbrains.kotlin.psi.psiUtil.startOffset
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.util.elementByOffset
|
||||
import org.jetbrains.kotlin.types.typeUtil.containsError
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class ResolveElementCacheTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() = KotlinLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -11,10 +11,13 @@ import com.intellij.testFramework.fixtures.CodeInsightTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class WordSelectionTest extends KotlinLightCodeInsightFixtureTestCase {
|
||||
private static final String TEST_RELATIVE_DIR = "wordSelection";
|
||||
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
package org.jetbrains.kotlin.idea.actions
|
||||
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class NewKotlinFileActionTest: LightCodeInsightFixtureTestCase() {
|
||||
companion object {
|
||||
private val EMPTY_PARTS_ERROR = "Name can't have empty parts"
|
||||
|
||||
@@ -11,8 +11,11 @@ import com.intellij.testFramework.LightCodeInsightTestCase
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase
|
||||
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtVisitorVoid
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.util.*
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class QualifiedNamesTest: LightCodeInsightTestCase() {
|
||||
fun testClassRef() {
|
||||
LightPlatformCodeInsightTestCase.configureFromFileText(
|
||||
|
||||
@@ -11,7 +11,10 @@ import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.util.application.executeWriteCommand
|
||||
import org.jetbrains.kotlin.idea.util.sourceRoots
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class ImplicitPackagePrefixTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
private lateinit var cacheService: PerModulePackageCacheService
|
||||
|
||||
|
||||
@@ -20,9 +20,12 @@ import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescrip
|
||||
import org.jetbrains.kotlin.load.java.JvmAbi
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.psi.KtProperty
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.junit.runner.RunWith
|
||||
import kotlin.reflect.KMutableProperty0
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinShortNamesCacheTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
|
||||
private lateinit var cacheInstance: PsiShortNamesCache
|
||||
|
||||
@@ -13,8 +13,11 @@ import org.jetbrains.kotlin.idea.caches.project.getModuleInfo
|
||||
import org.jetbrains.kotlin.idea.caches.project.getNullableModuleInfo
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class CustomModuleInfoTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -29,13 +29,16 @@ import org.jetbrains.kotlin.idea.framework.CommonLibraryKind
|
||||
import org.jetbrains.kotlin.idea.framework.JSLibraryKind
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase.*
|
||||
import org.jetbrains.kotlin.idea.util.application.runWriteAction
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.test.util.addDependency
|
||||
import org.jetbrains.kotlin.test.util.jarRoot
|
||||
import org.jetbrains.kotlin.test.util.projectLibrary
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstance
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class IdeaModuleInfoTest : ModuleTestCase() {
|
||||
|
||||
fun testSimpleModuleDependency() {
|
||||
|
||||
+3
@@ -6,8 +6,11 @@
|
||||
package org.jetbrains.kotlin.idea.caches.resolve
|
||||
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.TestJdkKind
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class Java8MultiModuleHighlightingTest : AbstractMultiModuleHighlightingTest() {
|
||||
override fun getTestDataPath() = PluginTestCaseBase.getTestDataPathBase() + "/multiModuleHighlighting/"
|
||||
|
||||
|
||||
+4
@@ -7,10 +7,14 @@ package org.jetbrains.kotlin.idea.caches.resolve
|
||||
|
||||
import com.intellij.openapi.module.Module
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.test.MockLibraryUtil
|
||||
import org.jetbrains.kotlin.test.TestJdkKind.FULL_JDK_9
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class Java9MultiModuleHighlightingTest : AbstractMultiModuleHighlightingTest() {
|
||||
override fun getTestDataPath(): String = PluginTestCaseBase.getTestDataPathBase() + "/multiModuleHighlighting/java9/"
|
||||
|
||||
|
||||
@@ -40,9 +40,12 @@ import org.jetbrains.kotlin.idea.util.application.runWriteAction
|
||||
import org.jetbrains.kotlin.idea.util.projectStructure.sdk
|
||||
import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverCommandLineProcessor.Companion.ANNOTATION_OPTION
|
||||
import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverCommandLineProcessor.Companion.PLUGIN_ID
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.MockLibraryUtil
|
||||
import org.jetbrains.kotlin.test.TestJdkKind.FULL_JDK
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
open class MultiModuleHighlightingTest : AbstractMultiModuleHighlightingTest() {
|
||||
override fun getTestDataPath() = PluginTestCaseBase.getTestDataPathBase() + "/multiModuleHighlighting/"
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ package org.jetbrains.kotlin.idea.codeInsight
|
||||
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class Java8OverrideImplementTest : AbstractOverrideImplementTest() {
|
||||
companion object {
|
||||
private val TEST_PATH = PluginTestCaseBase.getTestDataPathBase() + "/codeInsight/overrideImplement/jdk8"
|
||||
|
||||
@@ -9,8 +9,11 @@ import org.jetbrains.kotlin.idea.KotlinFileType
|
||||
import org.jetbrains.kotlin.idea.KotlinPairMatcher
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.lang.IllegalArgumentException
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinPairMatcherTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = KotlinLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ package org.jetbrains.kotlin.idea.codeInsight
|
||||
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.idea.test.configureLanguageAndApiVersion
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class OverrideImplementTest : AbstractOverrideImplementTest() {
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
|
||||
@@ -7,7 +7,10 @@ package org.jetbrains.kotlin.idea.codeInsight
|
||||
|
||||
import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class OverrideImplementWithLibTest : AbstractOverrideImplementTest() {
|
||||
private val TEST_PATH = PluginTestCaseBase.getTestDataPathBase() + "/codeInsight/overrideImplement/withLib"
|
||||
|
||||
|
||||
@@ -10,7 +10,10 @@ import com.intellij.testFramework.LightProjectDescriptor
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.KotlinFileType
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class SmartEnterTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
fun testIfCondition() = doFunTest(
|
||||
"""
|
||||
|
||||
+4
@@ -7,9 +7,13 @@ package org.jetbrains.kotlin.idea.configuration
|
||||
|
||||
import com.intellij.openapi.projectRoots.ProjectJdkTable
|
||||
import org.jetbrains.kotlin.idea.framework.KotlinSdkType
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
// Do not add new tests here since application is initialized only once
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class AutoConfigureKotlinSdkOnStartupTest : AbstractConfigureKotlinInTempDirTest() {
|
||||
fun testKotlinSdkAdded() {
|
||||
Assert.assertTrue(ProjectJdkTable.getInstance().allJdks.any { it.sdkType is KotlinSdkType })
|
||||
|
||||
@@ -14,9 +14,12 @@ import org.jetbrains.kotlin.idea.compiler.configuration.Kotlin2JsCompilerArgumen
|
||||
import org.jetbrains.kotlin.idea.compiler.configuration.KotlinCommonCompilerArgumentsHolder
|
||||
import org.jetbrains.kotlin.idea.project.getLanguageVersionSettings
|
||||
import org.jetbrains.kotlin.idea.project.languageVersionSettings
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.IOException
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
open class ConfigureKotlinInTempDirTest : AbstractConfigureKotlinInTempDirTest() {
|
||||
@Throws(IOException::class)
|
||||
fun testNoKotlincExistsNoSettingsRuntime10() {
|
||||
|
||||
@@ -37,7 +37,9 @@ import org.jetbrains.kotlin.idea.versions.KotlinRuntimeLibraryUtilKt;
|
||||
import org.jetbrains.kotlin.platform.impl.JsIdePlatformKind;
|
||||
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind;
|
||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleKt;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.jetbrains.kotlin.utils.PathUtil;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -49,6 +51,7 @@ import java.util.stream.StreamSupport;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.singletonList;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class ConfigureKotlinTest extends AbstractConfigureKotlinTest {
|
||||
public void testNewLibrary_copyJar() {
|
||||
doTestOneJavaModule(KotlinWithLibraryConfigurator.FileState.COPY);
|
||||
|
||||
+3
@@ -14,7 +14,10 @@ import org.jetbrains.kotlin.config.apiVersionView
|
||||
import org.jetbrains.kotlin.config.languageVersionView
|
||||
import org.jetbrains.kotlin.idea.compiler.configuration.KotlinCommonCompilerArgumentsHolder
|
||||
import org.jetbrains.kotlin.idea.framework.JavaFrameworkSupportProvider
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinFrameworkSupportProviderTest : FrameworkSupportProviderTestCase() {
|
||||
private fun doTest(provider: FrameworkSupportInModuleProvider) {
|
||||
selectFramework(provider).createLibraryDescription()
|
||||
|
||||
+4
@@ -19,11 +19,15 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.psi.KtFunction
|
||||
import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
private val LIBRARY_SRC_PATH = KotlinTestUtils.getHomeDirectory() + "/idea/idea-completion/testData/codeFragmentInLibrarySource/customLibrary/"
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class CodeFragmentCompletionInLibraryTest : AbstractJvmBasicCompletionTest() {
|
||||
|
||||
override fun getProjectDescriptor() = object: SdkAndMockLibraryProjectDescriptor(LIBRARY_SRC_PATH, false) {
|
||||
|
||||
@@ -8,7 +8,10 @@ import com.intellij.debugger.streams.test.DslTestCase
|
||||
import com.intellij.debugger.streams.trace.dsl.impl.DslImpl
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinCollectionsPeekCallFactory
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinStatementFactory
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinDslTest : DslTestCase(DslImpl(KotlinStatementFactory(KotlinCollectionsPeekCallFactory()))) {
|
||||
override fun getTestDataPath(): String {
|
||||
return "idea/testData/debugger/sequence/dsl"
|
||||
|
||||
+3
@@ -7,7 +7,10 @@ package org.jetbrains.kotlin.idea.debugger.sequence.psi.collection
|
||||
import com.intellij.debugger.streams.wrapper.StreamChainBuilder
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.KotlinPsiChainBuilderTestCase
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.lib.collections.KotlinCollectionSupportProvider
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class PositiveCollectionBuildTest : KotlinPsiChainBuilderTestCase.Positive("collection/positive") {
|
||||
override val kotlinChainBuilder: StreamChainBuilder = KotlinCollectionSupportProvider().chainBuilder
|
||||
|
||||
|
||||
+3
@@ -8,7 +8,10 @@ import com.intellij.debugger.streams.wrapper.StreamChainBuilder
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.lib.collections.KotlinCollectionSupportProvider
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.psi.TypedChainTestCase
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class TypedCollectionChainTest : TypedChainTestCase("collection/positive/types") {
|
||||
override val kotlinChainBuilder: StreamChainBuilder = KotlinCollectionSupportProvider().chainBuilder
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
*/
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.psi.java
|
||||
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class AmbiguousChainsTest : PositiveJavaStreamTest("ambiguous") {
|
||||
fun testSimpleExpression() = doTest(2)
|
||||
|
||||
|
||||
+4
@@ -4,6 +4,10 @@
|
||||
*/
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.psi.java
|
||||
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class LocationPositiveChainTest : PositiveJavaStreamTest("location") {
|
||||
fun testAnonymousBody() = doTest()
|
||||
|
||||
|
||||
+3
@@ -7,7 +7,10 @@ package org.jetbrains.kotlin.idea.debugger.sequence.psi.java
|
||||
import com.intellij.debugger.streams.wrapper.StreamChainBuilder
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.KotlinPsiChainBuilderTestCase
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.lib.java.JavaStandardLibrarySupportProvider
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class NegativeJavaStreamTest : KotlinPsiChainBuilderTestCase.Negative("streams/negative") {
|
||||
override val kotlinChainBuilder: StreamChainBuilder = JavaStandardLibrarySupportProvider().chainBuilder
|
||||
|
||||
|
||||
@@ -11,7 +11,10 @@ import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes.INT
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes.LONG
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes.NULLABLE_ANY
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class TypedJavaChainTest : TypedChainTestCase("streams/positive/types") {
|
||||
override val kotlinChainBuilder: StreamChainBuilder = JavaStandardLibrarySupportProvider().chainBuilder
|
||||
|
||||
|
||||
+3
@@ -8,7 +8,10 @@ import com.intellij.debugger.streams.wrapper.StreamChainBuilder
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.lib.sequence.KotlinSequenceSupportProvider
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.psi.TypedChainTestCase
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinSequenceTypes
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class TypedSequenceChain : TypedChainTestCase("sequence/positive/types") {
|
||||
override val kotlinChainBuilder: StreamChainBuilder = KotlinSequenceSupportProvider().chainBuilder
|
||||
|
||||
|
||||
@@ -9,7 +9,10 @@ import com.intellij.psi.ClassFileViewProvider
|
||||
import com.intellij.testFramework.LightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class InternalCompiledClassesTest : AbstractInternalCompiledClassesTest() {
|
||||
private val TEST_DATA_PATH = PluginTestCaseBase.getTestDataPathBase() + "/decompiler/internalClasses"
|
||||
|
||||
|
||||
+3
@@ -9,7 +9,10 @@ import com.intellij.testFramework.LightProjectDescriptor
|
||||
import junit.framework.TestCase
|
||||
import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class NavigateFromJSLibrarySourcesTest : AbstractNavigateFromLibrarySourcesTest() {
|
||||
fun testIcon() {
|
||||
TestCase.assertEquals(
|
||||
|
||||
+3
@@ -14,8 +14,11 @@ import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.psi.KtClass
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class NavigateFromLibrarySourcesTest: AbstractNavigateFromLibrarySourcesTest() {
|
||||
fun testJdkClass() {
|
||||
checkNavigationFromLibrarySource("Thread", "java.lang.Thread")
|
||||
|
||||
+3
@@ -17,7 +17,10 @@ import org.jetbrains.kotlin.idea.KotlinFileType;
|
||||
import org.jetbrains.kotlin.idea.KotlinLanguage;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor;
|
||||
import org.jetbrains.kotlin.idea.test.TestUtilsKt;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class NavigateToLibraryRegressionTest extends LightCodeInsightFixtureTestCase {
|
||||
|
||||
@Override
|
||||
|
||||
+3
@@ -10,7 +10,10 @@ import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.test.ProjectDescriptorWithStdlibSources;
|
||||
import org.jetbrains.kotlin.idea.test.TestUtilsKt;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class NavigateToStdlibSourceRegressionTest extends NavigateToLibraryRegressionTest {
|
||||
/**
|
||||
* Regression test against KT-3186
|
||||
|
||||
+3
-1
@@ -22,14 +22,16 @@ import org.jetbrains.kotlin.idea.caches.project.getNullableModuleInfo
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.NavigationChecker.Companion.checkAnnotatedCode
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.idea.util.projectStructure.getModuleDir
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.MockLibraryUtil
|
||||
import org.jetbrains.kotlin.test.testFramework.runWriteAction
|
||||
import org.jetbrains.kotlin.test.util.addDependency
|
||||
import org.jetbrains.kotlin.test.util.jarRoot
|
||||
import org.jetbrains.kotlin.test.util.projectLibrary
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class NavigationWithMultipleCustomLibrariesTest : AbstractNavigationToSourceOrDecompiledTest() {
|
||||
|
||||
override val testDataPath = PluginTestCaseBase.getTestDataPathBase() + "/decompiler/navigationMultipleLibs/"
|
||||
|
||||
+4
@@ -21,8 +21,12 @@ import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinClassStub
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtClassElementType
|
||||
import org.jetbrains.kotlin.serialization.deserialization.builtins.BuiltInSerializerProtocol
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class BuiltInDecompilerConsistencyTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
private val classFileDecompiler = KotlinClassFileDecompiler()
|
||||
private val builtInsDecompiler = KotlinBuiltInDecompiler()
|
||||
|
||||
@@ -16,8 +16,12 @@ import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtFileStubBuilder
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class ClsStubConsistencyTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
private fun doTest(id: ClassId) {
|
||||
val packageFile = VirtualFileFinder.SERVICE.getInstance(project).findVirtualFileWithHeader(id)
|
||||
|
||||
+4
-1
@@ -8,9 +8,12 @@ package org.jetbrains.kotlin.idea.decompiler.stubBuilder
|
||||
import com.intellij.testFramework.LightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.decompiler.textBuilder.findTestLibraryRoot
|
||||
import org.jetbrains.kotlin.idea.test.KotlinJdkAndLibraryProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class ClsStubBuilderForWrongAbiVersionTest : AbstractClsStubBuilderTest() {
|
||||
|
||||
fun testPackage() = testStubsForFileWithWrongAbiVersion("Wrong_packageKt")
|
||||
|
||||
+3
@@ -26,9 +26,12 @@ import org.jetbrains.kotlin.resolve.BindingTraceContext
|
||||
import org.jetbrains.kotlin.resolve.MemberComparator
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.resolveTopLevelClass
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class DecompiledTextConsistencyTest : LightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() =
|
||||
object : KotlinWithJdkAndRuntimeLightProjectDescriptor() {
|
||||
|
||||
+3
-1
@@ -13,10 +13,12 @@ import org.jetbrains.kotlin.idea.decompiler.classFile.KtClsFile
|
||||
import org.jetbrains.kotlin.idea.decompiler.common.INCOMPATIBLE_ABI_VERSION_GENERAL_COMMENT
|
||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.findClassFileByName
|
||||
import org.jetbrains.kotlin.idea.test.KotlinJdkAndLibraryProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class DecompiledTextForWrongAbiVersionTest : AbstractInternalCompiledClassesTest() {
|
||||
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor {
|
||||
|
||||
@@ -11,11 +11,13 @@ import com.intellij.testFramework.EditorTestUtil;
|
||||
import com.intellij.testFramework.LightCodeInsightTestCase;
|
||||
import org.jetbrains.kotlin.formatter.FormatSettingsUtil;
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.SettingsConfigurator;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class KotlinCommenterTest extends LightCodeInsightTestCase {
|
||||
private static final String BASE_PATH =
|
||||
new File(PluginTestCaseBase.getTestDataPathBase(), "/editor/commenter/").getAbsolutePath();
|
||||
|
||||
@@ -13,8 +13,11 @@ import com.intellij.testFramework.LightPlatformTestCase
|
||||
import com.intellij.testFramework.LightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCaseBase
|
||||
import org.jetbrains.kotlin.psi.KtLambdaExpression
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class LazyElementTypeTest : KotlinLightCodeInsightFixtureTestCaseBase() {
|
||||
fun testSplitArrow() = reparse("val t = { a: Int -<caret>> }", ' ')
|
||||
fun testDeleteArrow() = reparse("val t = { a: Int -><caret> }", BACKSPACE_FAKE_CHAR)
|
||||
|
||||
@@ -11,7 +11,10 @@ import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.testFramework.EditorTestUtil
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class StripTrailingSpacesTest : LightCodeInsightFixtureTestCase() {
|
||||
override fun getTestDataPath(): String {
|
||||
return PluginTestCaseBase.getTestDataPathBase() + "/editor/stripTrailingSpaces/"
|
||||
|
||||
@@ -13,7 +13,10 @@ import com.intellij.testFramework.LightPlatformTestCase
|
||||
import org.jetbrains.kotlin.idea.KotlinFileType
|
||||
import org.jetbrains.kotlin.idea.formatter.KotlinStyleGuideCodeStyle
|
||||
import org.jetbrains.kotlin.idea.formatter.ktCodeStyleSettings
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class TypedHandlerTest : LightCodeInsightTestCase() {
|
||||
private val dollar = '$'
|
||||
|
||||
|
||||
@@ -12,8 +12,11 @@ import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescrip
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.psi.KtClass
|
||||
import org.jetbrains.kotlin.psi.KtProperty
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class QuickDocInCompletionTest: KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getTestDataPath(): String {
|
||||
return PluginTestCaseBase.getTestDataPathBase() + "/kdoc/inCompletion/"
|
||||
|
||||
@@ -22,7 +22,10 @@ import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||
import org.jetbrains.kotlin.idea.KotlinQuickDocumentationProvider
|
||||
import org.jetbrains.kotlin.idea.hierarchy.KotlinTypeHierarchyProvider
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class QuickDocInHierarchyTest() : CodeInsightTestCase() {
|
||||
override fun getTestDataPath(): String {
|
||||
return PluginTestCaseBase.getTestDataPathBase() + "/kdoc/inTypeHierarchy/"
|
||||
|
||||
@@ -17,8 +17,11 @@ import org.jetbrains.kotlin.psi.KtDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtFunction
|
||||
import org.jetbrains.kotlin.psi.KtProperty
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getParentOfType
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class QuickDocNavigationTest() : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getTestDataPath(): String {
|
||||
return PluginTestCaseBase.getTestDataPathBase() + "/kdoc/navigate/"
|
||||
|
||||
@@ -10,10 +10,13 @@ import com.intellij.testFramework.LightPlatformTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.util.application.runWriteAction
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class ExternalAnnotationTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
|
||||
fun testNotNullMethod() {
|
||||
|
||||
@@ -12,11 +12,14 @@ import com.intellij.psi.search.GlobalSearchScope
|
||||
import com.intellij.testFramework.LightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.refactoring.toVirtualFile
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
private data class SuffixOption(val suffix: String, val expectedLine: Int, val expectedColumn: Int)
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinExceptionFilterTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
private val mySuffixPlug = "<suffix>"
|
||||
private val myPathPlug = "<path>"
|
||||
|
||||
@@ -13,8 +13,11 @@ import org.jetbrains.kotlin.idea.imports.KotlinImportOptimizer
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.idea.util.application.executeWriteCommand
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class FoldingAfterOptimizeImportsTest : AbstractKotlinFoldingTest() {
|
||||
private val fixture: JavaCodeInsightTestFixture
|
||||
get() = myFixture!!
|
||||
|
||||
@@ -7,9 +7,11 @@ package org.jetbrains.kotlin.idea.framework.ui;
|
||||
|
||||
import com.intellij.testFramework.LightIdeaTestCase;
|
||||
import com.intellij.util.text.VersionComparatorUtil;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class LoadVersionsFromMavenTest extends LightIdeaTestCase {
|
||||
public void testDownload() throws Exception {
|
||||
Collection<String> versions = ConfigureDialogWithModulesAndVersion.loadVersions("1.0.0");
|
||||
|
||||
@@ -11,7 +11,10 @@ import com.intellij.testFramework.LightProjectDescriptor
|
||||
import com.intellij.testFramework.PlatformTestUtil
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class HighlightingPerformanceTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
private val text = """
|
||||
fun test(a: String, b: ArrayList<java.util.Date>) {
|
||||
|
||||
@@ -13,8 +13,11 @@ import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.util.application.executeWriteCommand
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class HighlightingUpdateTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = KotlinLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -15,9 +15,12 @@ import org.jetbrains.kotlin.idea.stubs.createFacet
|
||||
import org.jetbrains.kotlin.idea.test.KotlinJdkAndLibraryProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.MockLibraryUtil
|
||||
import org.jetbrains.kotlin.utils.ReportLevel
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class Jsr305HighlightingTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor {
|
||||
val foreignAnnotationsJar = MockLibraryUtil.compileJvmLibraryToJar("third-party/annotations", "foreign-annotations")
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
package org.jetbrains.kotlin.idea.highlighter
|
||||
|
||||
import com.intellij.testFramework.LexerTestCase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinHighlightingLexerTest : LexerTestCase() {
|
||||
override fun createLexer() = KotlinHighlightingLexer()
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ package org.jetbrains.kotlin.idea.highlighter
|
||||
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinRainbowHighlighterTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -17,8 +17,11 @@ import org.jetbrains.kotlin.idea.test.KotlinJdkAndLibraryProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class NoErrorsInStdlibTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
fun testNoErrors() {
|
||||
val relativePathToProjectRoot = File(System.getProperty("user.dir")).relativeTo(File(myFixture.testDataPath)).path
|
||||
|
||||
@@ -7,7 +7,10 @@ package org.jetbrains.kotlin.idea.index
|
||||
|
||||
import com.intellij.testFramework.LightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class IndexExceptionTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
fun testRecursionInTypeParameters() {
|
||||
myFixture.configureByText("test.kt", "fun <T: T> T.some() {}")
|
||||
|
||||
+3
@@ -10,7 +10,10 @@ import com.intellij.testFramework.LightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class CoroutineNonBlockingContextDetectionTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getTestDataPath(): String = PluginTestCaseBase.getTestDataPathBase() + "/inspections/blockingCallsDetection"
|
||||
|
||||
|
||||
@@ -17,7 +17,10 @@ import com.intellij.testFramework.LightPlatformTestCase
|
||||
import com.intellij.testFramework.UsefulTestCase
|
||||
import gnu.trove.THashMap
|
||||
import org.jetbrains.kotlin.idea.KotlinPluginUtil
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class InspectionDescriptionTest : LightPlatformTestCase() {
|
||||
|
||||
fun testDescriptionsAndShortNames() {
|
||||
|
||||
@@ -13,7 +13,10 @@ import com.intellij.testFramework.LightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinCleanupInspectionTest(): KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getTestDataPath(): String
|
||||
= PluginTestCaseBase.getTestDataPathBase() + "/inspections/cleanup"
|
||||
|
||||
@@ -11,8 +11,11 @@ import com.intellij.openapi.extensions.Extensions
|
||||
import com.intellij.testFramework.LightPlatformTestCase
|
||||
import com.intellij.testFramework.UsefulTestCase
|
||||
import org.jetbrains.kotlin.idea.KotlinPluginUtil
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class IntentionDescriptionTest : LightPlatformTestCase() {
|
||||
|
||||
private val necessaryNormalNames = listOf("description.html", "before.kt.template", "after.kt.template")
|
||||
|
||||
@@ -18,9 +18,12 @@ import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescrip
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||
import org.jetbrains.kotlin.name.SpecialNames;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.jetbrains.kotlin.asJava.LightClassUtilsKt.toLightClass;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class KotlinJavaFacadeTest extends KotlinLightCodeInsightFixtureTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
|
||||
@@ -17,8 +17,11 @@ import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinJvmDeclarationSearcherTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -12,8 +12,11 @@ import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KDocFinderTest() : LightPlatformCodeInsightFixtureTestCase() {
|
||||
override fun getTestDataPath(): String {
|
||||
return PluginTestCaseBase.getTestDataPathBase() + "/kdoc/finder/"
|
||||
|
||||
@@ -19,9 +19,12 @@ import org.jetbrains.kotlin.kdoc.psi.impl.KDocSection
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.resolve.BindingContext.DECLARATION_TO_DESCRIPTOR
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.junit.runner.RunWith
|
||||
import java.io.File
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KDocSampleTest : AbstractMultiModuleTest() {
|
||||
|
||||
override fun getTestDataPath() = "${PluginTestCaseBase.getTestDataPathBase()}/kdoc/multiModuleSamples/"
|
||||
|
||||
@@ -13,7 +13,10 @@ import com.intellij.refactoring.rename.RenameProcessor;
|
||||
import com.intellij.testFramework.LightCodeInsightTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class KdocRenameTest extends LightCodeInsightTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
|
||||
@@ -15,7 +15,10 @@ import org.jetbrains.kotlin.idea.caches.lightClasses.KtLightClassForDecompiledDe
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor;
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class LightClassEqualsTest extends KotlinLightCodeInsightFixtureTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
|
||||
@@ -14,9 +14,11 @@ import org.jetbrains.kotlin.asJava.toLightMethods
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
import java.lang.System.identityHashCode as idh
|
||||
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class LightElementsEqualsTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
|
||||
private val SAMPLE_SOURCE = """
|
||||
|
||||
@@ -10,11 +10,14 @@ import com.intellij.openapi.module.StdModuleTypes
|
||||
import org.jetbrains.kotlin.idea.stubs.AbstractMultiModuleTest
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.idea.test.allKotlinFiles
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.MockLibraryUtil
|
||||
import org.jetbrains.kotlin.test.util.addDependency
|
||||
import org.jetbrains.kotlin.test.util.jarRoot
|
||||
import org.jetbrains.kotlin.test.util.projectLibrary
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class GotoWithMultipleLibrariesTest : AbstractMultiModuleTest() {
|
||||
override fun getTestDataPath() = "${PluginTestCaseBase.getTestDataPathBase()}/multiModuleReferenceResolve/sameJarInDifferentLibraries/"
|
||||
|
||||
|
||||
+3
@@ -11,9 +11,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor;
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner.class)
|
||||
public class KotlinGotoImplementationMultifileTest extends KotlinLightCodeInsightFixtureTestCase {
|
||||
public void testImplementFunInJava() {
|
||||
doKotlinJavaTest();
|
||||
|
||||
@@ -7,7 +7,11 @@ package org.jetbrains.kotlin.idea.parameterInfo
|
||||
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class ArgumentNameHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ package org.jetbrains.kotlin.idea.parameterInfo
|
||||
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class InlayTypeHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -8,7 +8,10 @@ package org.jetbrains.kotlin.idea.parameterInfo
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class LambdaImplicitHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -13,9 +13,12 @@ import com.intellij.testFramework.utils.inlays.InlayHintsChecker
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.kotlin.test.TagsTestDataUtil
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
companion object {
|
||||
const val DISABLE_ACTION_TEXT = "Do not show lambda return expression hints"
|
||||
|
||||
@@ -8,7 +8,10 @@ package org.jetbrains.kotlin.idea.parameterInfo
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class SuspendingCallHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
package org.jetbrains.kotlin.idea.quickfix
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import org.jetbrains.kotlin.idea.core.script.isScriptDependenciesUpdaterDisabled
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightJava9ModulesCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinMultiModuleJava9ProjectDescriptor.ModuleDescriptor.*
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class KotlinAddRequiredModuleTest : KotlinLightJava9ModulesCodeInsightFixtureTestCase() {
|
||||
private val messageM2 = QuickFixBundle.message("module.info.add.requires.name", "M_TWO")!!
|
||||
|
||||
|
||||
@@ -11,7 +11,11 @@ import com.intellij.psi.PsiType
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.uast.UMethod
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class CommonIntentionActionsParametersTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
|
||||
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE_FULL_JDK
|
||||
|
||||
+3
@@ -11,7 +11,10 @@ import com.intellij.psi.PsiType
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.uast.UMethod
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class CommonIntentionActionsParametersTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
|
||||
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE_FULL_JDK
|
||||
|
||||
@@ -21,9 +21,12 @@ import org.jetbrains.kotlin.asJava.toLightElements
|
||||
import org.jetbrains.kotlin.idea.search.allScope
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.psi.KtModifierListOwner
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.uast.toUElement
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class CommonIntentionActionsTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
private class SimpleMethodRequest(
|
||||
project: Project,
|
||||
|
||||
@@ -23,9 +23,12 @@ import org.jetbrains.kotlin.idea.search.allScope
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.uast.UParameter
|
||||
import org.jetbrains.uast.UastContext
|
||||
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
|
||||
import org.jetbrains.uast.toUElement
|
||||
import org.junit.Assert
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||
class CommonIntentionActionsTest : LightPlatformCodeInsightFixtureTestCase() {
|
||||
private class SimpleMethodRequest(
|
||||
project: Project,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user