mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
KTIJ-31786 [kotlin] Regenerate JS tests for K2 Mode
(cherry picked from commit 0d542b3eebde55b67f66e45c7162e3e69e1ce607) IJ-CR-149236 GitOrigin-RevId: 3ec28c5b3c481d55c7274777dfda8cba4a39625d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d73aaf0360
commit
80dc0c4bc0
@@ -7,14 +7,12 @@ import org.jetbrains.kotlin.AbstractImportsTest
|
||||
import org.jetbrains.kotlin.executeOnPooledThreadInReadAction
|
||||
import org.jetbrains.kotlin.idea.base.test.IgnoreTests
|
||||
import org.jetbrains.kotlin.idea.imports.KotlinFirImportOptimizer
|
||||
import org.jetbrains.kotlin.idea.test.KotlinStdJSProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.idea.util.application.executeWriteCommand
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
|
||||
abstract class AbstractK2JvmOptimizeImportsTest : AbstractImportsTest() {
|
||||
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor =
|
||||
KotlinWithJdkAndRuntimeLightProjectDescriptor.getInstanceFullJdk()
|
||||
abstract class AbstractK2OptimizeImportsTest : AbstractImportsTest() {
|
||||
|
||||
override val runTestInWriteCommand: Boolean = false
|
||||
|
||||
@@ -42,4 +40,13 @@ abstract class AbstractK2JvmOptimizeImportsTest : AbstractImportsTest() {
|
||||
|
||||
override val nameCountToUseStarImportDefault: Int
|
||||
get() = Integer.MAX_VALUE
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AbstractK2JvmOptimizeImportsTest : AbstractK2OptimizeImportsTest() {
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor =
|
||||
KotlinWithJdkAndRuntimeLightProjectDescriptor.getInstanceFullJdk()
|
||||
}
|
||||
|
||||
abstract class AbstractK2JsOptimizeImportsTest : AbstractK2OptimizeImportsTest() {
|
||||
override fun getProjectDescriptor(): LightProjectDescriptor = KotlinStdJSProjectDescriptor
|
||||
}
|
||||
@@ -0,0 +1,690 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.fir.imports;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.idea.base.plugin.KotlinPluginMode;
|
||||
import org.jetbrains.kotlin.idea.base.test.TestRoot;
|
||||
import org.jetbrains.kotlin.idea.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* This class is generated by {@link org.jetbrains.kotlin.testGenerator.generator.TestGenerator}.
|
||||
* DO NOT MODIFY MANUALLY.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
@TestRoot("fir/tests")
|
||||
@TestDataPath("$CONTENT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public abstract class K2JsOptimizeImportsTestGenerated extends AbstractK2JsOptimizeImportsTest {
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../idea/tests/testData/editor/optimizeImports/js")
|
||||
public static class Js extends AbstractK2JsOptimizeImportsTest {
|
||||
@java.lang.Override
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final KotlinPluginMode getPluginMode() {
|
||||
return KotlinPluginMode.K2;
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("DefaultJsImports.kt")
|
||||
public void testDefaultJsImports() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/js/DefaultJsImports.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../idea/tests/testData/editor/optimizeImports/common")
|
||||
public abstract static class Common extends AbstractK2JsOptimizeImportsTest {
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../idea/tests/testData/editor/optimizeImports/common/basic")
|
||||
public static class Basic extends AbstractK2JsOptimizeImportsTest {
|
||||
@java.lang.Override
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final KotlinPluginMode getPluginMode() {
|
||||
return KotlinPluginMode.K2;
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("UnusedClass.kt")
|
||||
public void testUnusedClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UnusedClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UnusedExtensionFunction.kt")
|
||||
public void testUnusedExtensionFunction() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UnusedExtensionFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UnusedExtensionProperty.kt")
|
||||
public void testUnusedExtensionProperty() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UnusedExtensionProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UnusedFunction.kt")
|
||||
public void testUnusedFunction() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UnusedFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UnusedProperty.kt")
|
||||
public void testUnusedProperty() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UnusedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UnusedStarImport.kt")
|
||||
public void testUnusedStarImport() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UnusedStarImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedClass.kt")
|
||||
public void testUsedClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedClassWithAlias.kt")
|
||||
public void testUsedClassWithAlias() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedClassWithAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedConstructor.kt")
|
||||
public void testUsedConstructor() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedExtensionFunction.kt")
|
||||
public void testUsedExtensionFunction() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedExtensionFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedExtensionFunctionImplicitReceiver.kt")
|
||||
public void testUsedExtensionFunctionImplicitReceiver() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedExtensionFunctionImplicitReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedExtensionProperty.kt")
|
||||
public void testUsedExtensionProperty() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedExtensionProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedFunction.kt")
|
||||
public void testUsedFunction() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedFunctionReference.kt")
|
||||
public void testUsedFunctionReference() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedFunctionReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedProperty.kt")
|
||||
public void testUsedProperty() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedStarImport.kt")
|
||||
public void testUsedStarImport() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedStarImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UsedTypeQualifierWithAlias.kt")
|
||||
public void testUsedTypeQualifierWithAlias() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/basic/UsedTypeQualifierWithAlias.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../idea/tests/testData/editor/optimizeImports/common/kDoc")
|
||||
public static class KDoc extends AbstractK2JsOptimizeImportsTest {
|
||||
@java.lang.Override
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final KotlinPluginMode getPluginMode() {
|
||||
return KotlinPluginMode.K2;
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("extensionForBaseClassViaChildClass.kt")
|
||||
public void testExtensionForBaseClassViaChildClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/kDoc/extensionForBaseClassViaChildClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unresolvedNameInKDocDoesHoldImports.kt")
|
||||
public void testUnresolvedNameInKDocDoesHoldImports() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/kDoc/unresolvedNameInKDocDoesHoldImports.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../idea/tests/testData/editor/optimizeImports/common/kt21515")
|
||||
public static class Kt21515 extends AbstractK2JsOptimizeImportsTest {
|
||||
@java.lang.Override
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final KotlinPluginMode getPluginMode() {
|
||||
return KotlinPluginMode.K2;
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("callableReferenceOnClass.kt")
|
||||
public void testCallableReferenceOnClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("callableReferenceOnClassWithCompanion.kt")
|
||||
public void testCallableReferenceOnClassWithCompanion() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClassWithCompanion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("callableReferenceOnObject.kt")
|
||||
public void testCallableReferenceOnObject() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/kt21515/callableReferenceOnObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constructor.kt")
|
||||
public void testConstructor() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/kt21515/constructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeReference.kt")
|
||||
public void testTypeReference() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/kt21515/typeReference.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../idea/tests/testData/editor/optimizeImports/common")
|
||||
public static class Uncategorized extends AbstractK2JsOptimizeImportsTest {
|
||||
@java.lang.Override
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final KotlinPluginMode getPluginMode() {
|
||||
return KotlinPluginMode.K2;
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("AliasedImportFromObject.kt")
|
||||
public void testAliasedImportFromObject() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/AliasedImportFromObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ArrayAccessExpression.kt")
|
||||
public void testArrayAccessExpression() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ArrayAccessExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("BacktickSort.kt")
|
||||
public void testBacktickSort() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/BacktickSort.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassMemberImported.kt")
|
||||
public void testClassMemberImported() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ClassMemberImported.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Companion.kt")
|
||||
public void testCompanion() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Companion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("CompanionExtensionFunctionReference.kt")
|
||||
public void testCompanionExtensionFunctionReference() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/CompanionExtensionFunctionReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("CompanionFunction.kt")
|
||||
public void testCompanionFunction() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/CompanionFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("CompanionFunction2.kt")
|
||||
public void testCompanionFunction2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/CompanionFunction2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("CompanionInNestedClass.kt")
|
||||
public void testCompanionInNestedClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/CompanionInNestedClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("CompanionWithInvoke.kt")
|
||||
public void testCompanionWithInvoke() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/CompanionWithInvoke.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ComponentFunction.kt")
|
||||
public void testComponentFunction() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ComponentFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictWithAlias.kt")
|
||||
public void testConflictWithAlias() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ConflictWithAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictWithAlias2.kt")
|
||||
public void testConflictWithAlias2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ConflictWithAlias2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictWithUnresolvedName.kt")
|
||||
public void testConflictWithUnresolvedName() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ConflictWithUnresolvedName.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ConflictWithUnresolvedName2.kt")
|
||||
public void testConflictWithUnresolvedName2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ConflictWithUnresolvedName2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("CurrentPackage.kt")
|
||||
public void testCurrentPackage() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/CurrentPackage.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("DefaultImportAndAlias.kt")
|
||||
public void testDefaultImportAndAlias() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/DefaultImportAndAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("DefaultImportAndAlias2.kt")
|
||||
public void testDefaultImportAndAlias2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/DefaultImportAndAlias2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("DefaultObjectReference.kt")
|
||||
public void testDefaultObjectReference() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/DefaultObjectReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("EnumEntryUsedInsideEnum.kt")
|
||||
public void testEnumEntryUsedInsideEnum() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/EnumEntryUsedInsideEnum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Enums.kt")
|
||||
public void testEnums() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Enums.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExplicitImportIsNotRemovedToAvoidConflict.kt")
|
||||
public void testExplicitImportIsNotRemovedToAvoidConflict() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExplicitImportIsNotRemovedToAvoidConflict.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunWithThisReference.kt")
|
||||
public void testExtensionFunWithThisReference() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunWithThisReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunWithThisReference_unusedImport.kt")
|
||||
public void testExtensionFunWithThisReference_unusedImport() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunWithThisReference_unusedImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunctionalTypeVal.kt")
|
||||
public void testExtensionFunctionalTypeVal() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunctionalTypeVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunctionalTypeValFromCompanionObject.kt")
|
||||
public void testExtensionFunctionalTypeValFromCompanionObject() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion.kt")
|
||||
public void testExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunctionalTypeValFromCompanionObjectNonExtCall.kt")
|
||||
public void testExtensionFunctionalTypeValFromCompanionObjectNonExtCall() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectNonExtCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunctionalTypeValFromObject.kt")
|
||||
public void testExtensionFunctionalTypeValFromObject() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunctionalTypeValFromObject_qualified.kt")
|
||||
public void testExtensionFunctionalTypeValFromObject_qualified() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromObject_qualified.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunctionalTypeVal_qualified.kt")
|
||||
public void testExtensionFunctionalTypeVal_qualified() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunctionalTypeVal_qualified.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunctionalTypeVal_qualified_regularCall.kt")
|
||||
public void testExtensionFunctionalTypeVal_qualified_regularCall() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunctionalTypeVal_qualified_regularCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExtensionFunctionalTypeVal_regularCall.kt")
|
||||
public void testExtensionFunctionalTypeVal_regularCall() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ExtensionFunctionalTypeVal_regularCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FunctionImportedFromObjectSuperClass.kt")
|
||||
public void testFunctionImportedFromObjectSuperClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/FunctionImportedFromObjectSuperClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FunctionalTypeVal.kt")
|
||||
public void testFunctionalTypeVal() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/FunctionalTypeVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FunctionalTypeVal_qualified.kt")
|
||||
public void testFunctionalTypeVal_qualified() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/FunctionalTypeVal_qualified.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ImplicitCompanionReceiverInClass.kt")
|
||||
public void testImplicitCompanionReceiverInClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ImplicitCompanionReceiverInClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InnerClassConstructor_superType.kt")
|
||||
public void testInnerClassConstructor_superType() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/InnerClassConstructor_superType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("IntUnaryOperatorsAreNotUnresolvedOnLiterals.kt")
|
||||
public void testIntUnaryOperatorsAreNotUnresolvedOnLiterals() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/IntUnaryOperatorsAreNotUnresolvedOnLiterals.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InvokeFunction.kt")
|
||||
public void testInvokeFunction() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/InvokeFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InvokeFunctionCallWithInvalidArguments.kt")
|
||||
public void testInvokeFunctionCallWithInvalidArguments() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/InvokeFunctionCallWithInvalidArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InvokeFunctionCallWithOverloadAmbiguity.kt")
|
||||
public void testInvokeFunctionCallWithOverloadAmbiguity() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/InvokeFunctionCallWithOverloadAmbiguity.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InvokeFunctionCallWithOverloadAmbiguity_literalReceiver.kt")
|
||||
public void testInvokeFunctionCallWithOverloadAmbiguity_literalReceiver() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/InvokeFunctionCallWithOverloadAmbiguity_literalReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InvokeOnFunctionalTypeVsUnusedInvokeImport.kt")
|
||||
public void testInvokeOnFunctionalTypeVsUnusedInvokeImport() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/InvokeOnFunctionalTypeVsUnusedInvokeImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("IteratorFunction.kt")
|
||||
public void testIteratorFunction() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/IteratorFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("IteratorFunction2.kt")
|
||||
public void testIteratorFunction2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/IteratorFunction2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("IteratorFunction_fromObject.kt")
|
||||
public void testIteratorFunction_fromObject() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/IteratorFunction_fromObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("IteratorFunction_fromObject_unused.kt")
|
||||
public void testIteratorFunction_fromObject_unused() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/IteratorFunction_fromObject_unused.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("KT11640.kt")
|
||||
public void testKT11640() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/KT11640.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("KT11640_1.kt")
|
||||
public void testKT11640_1() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/KT11640_1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("KT13689.kt")
|
||||
public void testKT13689() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/KT13689.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("KT9875.kt")
|
||||
public void testKT9875() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/KT9875.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("KeywordNames.kt")
|
||||
public void testKeywordNames() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/KeywordNames.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Kt2488EnumEntry.kt")
|
||||
public void testKt2488EnumEntry() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Kt2488EnumEntry.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Kt2709.kt")
|
||||
public void testKt2709() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Kt2709.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Kt32409.kt")
|
||||
public void testKt32409() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Kt32409.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("MemberImports.kt")
|
||||
public void testMemberImports() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/MemberImports.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("MembersInScope.kt")
|
||||
public void testMembersInScope() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/MembersInScope.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedClassConstructorReferenceThroughTopLevelClass.kt")
|
||||
public void testNestedClassConstructorReferenceThroughTopLevelClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/NestedClassConstructorReferenceThroughTopLevelClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedClassConstructorReferenceThroughTopLevelClass_redundantImport.kt")
|
||||
public void testNestedClassConstructorReferenceThroughTopLevelClass_redundantImport() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/NestedClassConstructorReferenceThroughTopLevelClass_redundantImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedClassReferenceOutsideClassBody.kt")
|
||||
public void testNestedClassReferenceOutsideClassBody() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/NestedClassReferenceOutsideClassBody.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedClassReferenceOutsideClassBodyThroughTopLevelClass_redundantImport.kt")
|
||||
public void testNestedClassReferenceOutsideClassBodyThroughTopLevelClass_redundantImport() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/NestedClassReferenceOutsideClassBodyThroughTopLevelClass_redundantImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedClassReferenceThroughAlias.kt")
|
||||
public void testNestedClassReferenceThroughAlias() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/NestedClassReferenceThroughAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedClassReferenceThroughTopLevelClass.kt")
|
||||
public void testNestedClassReferenceThroughTopLevelClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/NestedClassReferenceThroughTopLevelClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Overloads.kt")
|
||||
public void testOverloads() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Overloads.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Overloads_invoke.kt")
|
||||
public void testOverloads_invoke() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Overloads_invoke.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Overloads_invoke_noConflict.kt")
|
||||
public void testOverloads_invoke_noConflict() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Overloads_invoke_noConflict.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Overloads_noConflict.kt")
|
||||
public void testOverloads_noConflict() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Overloads_noConflict.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Overloads_sameFile.kt")
|
||||
public void testOverloads_sameFile() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Overloads_sameFile.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Overloads_sameFile_2.kt")
|
||||
public void testOverloads_sameFile_2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Overloads_sameFile_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Overloads_sameFile_2_noConflict.kt")
|
||||
public void testOverloads_sameFile_2_noConflict() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Overloads_sameFile_2_noConflict.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Overloads_sameFile_nestedCall.kt")
|
||||
public void testOverloads_sameFile_nestedCall() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Overloads_sameFile_nestedCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Overloads_sameSignature.kt")
|
||||
public void testOverloads_sameSignature() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/Overloads_sameSignature.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ProvideDelegate.kt")
|
||||
public void testProvideDelegate() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ProvideDelegate.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ProvideDelegate2.kt")
|
||||
public void testProvideDelegate2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ProvideDelegate2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ProvideDelegate_fromObject.kt")
|
||||
public void testProvideDelegate_fromObject() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ProvideDelegate_fromObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ProvideDelegate_fromObject_unused.kt")
|
||||
public void testProvideDelegate_fromObject_unused() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ProvideDelegate_fromObject_unused.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ResolvedImportAndUnresolvedReference.kt")
|
||||
public void testResolvedImportAndUnresolvedReference() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/ResolvedImportAndUnresolvedReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SamConstructor_nestedClass.kt")
|
||||
public void testSamConstructor_nestedClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/SamConstructor_nestedClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SeveralClasses.kt")
|
||||
public void testSeveralClasses() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/SeveralClasses.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SeveralClasses2.kt")
|
||||
public void testSeveralClasses2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/SeveralClasses2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SeveralClasses3.kt")
|
||||
public void testSeveralClasses3() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/SeveralClasses3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TwoConstructors.kt")
|
||||
public void testTwoConstructors() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/TwoConstructors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAliasedConstructor.kt")
|
||||
public void testTypeAliasedConstructor() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/TypeAliasedConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAliasedConstructor_annotation.kt")
|
||||
public void testTypeAliasedConstructor_annotation() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/TypeAliasedConstructor_annotation.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAliasedConstructor_innerClass.kt")
|
||||
public void testTypeAliasedConstructor_innerClass() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/TypeAliasedConstructor_innerClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAliasedConstructor_samConstructor.kt")
|
||||
public void testTypeAliasedConstructor_samConstructor() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/TypeAliasedConstructor_samConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAliasedConstructor_sameName.kt")
|
||||
public void testTypeAliasedConstructor_sameName() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/TypeAliasedConstructor_sameName.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UnresolvedImport.kt")
|
||||
public void testUnresolvedImport() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/UnresolvedImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("UnresolvedImport2.kt")
|
||||
public void testUnresolvedImport2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/UnresolvedImport2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unusedImportFromObject.kt")
|
||||
public void testUnusedImportFromObject() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/unusedImportFromObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("WithAlias.kt")
|
||||
public void testWithAlias() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/WithAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("WithAlias2.kt")
|
||||
public void testWithAlias2() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/WithAlias2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("WithoutFormatter.kt")
|
||||
public void testWithoutFormatter() throws Exception {
|
||||
runTest("../../idea/tests/testData/editor/optimizeImports/common/WithoutFormatter.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ import org.jetbrains.kotlin.idea.fir.folding.AbstractFirFoldingTest
|
||||
import org.jetbrains.kotlin.idea.fir.imports.AbstractK2JvmOptimizeImportsTest
|
||||
import org.jetbrains.kotlin.idea.fir.imports.AbstractK2AutoImportTest
|
||||
import org.jetbrains.kotlin.idea.fir.imports.AbstractK2FilteringAutoImportTest
|
||||
import org.jetbrains.kotlin.idea.fir.imports.AbstractK2JsOptimizeImportsTest
|
||||
import org.jetbrains.kotlin.idea.fir.kmp.AbstractK2KmpLightFixtureHighlightingTest
|
||||
import org.jetbrains.kotlin.idea.fir.navigation.AbstractFirGotoDeclarationTest
|
||||
import org.jetbrains.kotlin.idea.fir.navigation.AbstractFirGotoRelatedSymbolMultiModuleTest
|
||||
@@ -219,6 +220,11 @@ private fun assembleWorkspace(): TWorkspace = workspace(KotlinPluginMode.K2) {
|
||||
model("editor/optimizeImports/common", pattern = KT_WITHOUT_DOTS)
|
||||
}
|
||||
|
||||
testClass<AbstractK2JsOptimizeImportsTest> {
|
||||
model("editor/optimizeImports/js", pattern = KT_WITHOUT_DOTS)
|
||||
model("editor/optimizeImports/common", pattern = KT_WITHOUT_DOTS)
|
||||
}
|
||||
|
||||
testClass<AbstractK2BytecodeToolWindowTest> {
|
||||
model("internal/toolWindow", isRecursive = false, pattern = DIRECTORY)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user