From 5bbaa6b1ece38b78c7a0ac381d6f2f3f53808ec7 Mon Sep 17 00:00:00 2001 From: Andrey Cherkasov Date: Tue, 7 May 2024 06:31:06 +0400 Subject: [PATCH] [kotlin] Port SurroundWithNullCheckFix to K2 ^KTIJ-29540 GitOrigin-RevId: 4c60378b27eb11ca86b9268487f77924a102f49f --- .../fixes/KotlinK2QuickFixRegistrar.kt | 13 + .../fixes/SurroundWithNullCheckFixFactory.kt | 138 ++ ...ghLevelQuickFixMultiFileTestGenerated.java | 1858 +++++++++-------- .../fixes/HighLevelQuickFixTestGenerated.java | 126 ++ .../surroundWithNullCheck/argumentNullable.kt | 3 +- .../argumentNullable.kt.after | 3 +- .../surroundWithNullCheck/assignment.kt | 3 +- .../surroundWithNullCheck/assignment.kt.after | 3 +- .../quickfix/surroundWithNullCheck/in.kt | 3 +- .../surroundWithNullCheck/in.kt.after | 3 +- .../surroundWithNullCheck/inLambda.kt | 3 +- .../surroundWithNullCheck/inLambda.kt.after | 3 +- .../surroundWithNullCheck/inLambda3.kt | 3 +- .../surroundWithNullCheck/inLambda3.kt.after | 3 +- .../surroundWithNullCheck/infixUnsafeCall.kt | 3 +- .../infixUnsafeCall.kt.after | 3 +- .../surroundWithNullCheck/invokeFuncUnsafe.kt | 3 +- .../invokeFuncUnsafe.kt.after | 3 +- .../surroundWithNullCheck/invokeUnsafe.kt | 3 +- .../invokeUnsafe.kt.after | 3 +- .../surroundWithNullCheck/iteratorUnsafe.kt | 3 +- .../iteratorUnsafe.kt.after | 3 +- .../nullableInCondition.kt | 3 +- .../nullableInCondition.kt.after | 3 +- .../objectNestedQualifiers.kt | 3 +- .../objectNestedQualifiers.kt.after | 3 +- .../surroundWithNullCheck/objectQualifier.kt | 3 +- .../objectQualifier.kt.after | 3 +- .../surroundWithNullCheck/simpleUnsafeCall.kt | 3 +- .../simpleUnsafeCall.kt.after | 3 +- .../unsafeCallInBinary.kt | 3 +- .../unsafeCallInBinary.kt.after | 3 +- .../unsafeCallInsideAnonymous.kt | 3 +- .../unsafeCallInsideAnonymous.kt.after | 3 +- .../unsafeCallInsideIf.kt | 3 +- .../unsafeCallInsideIf.kt.after | 3 +- .../unsafeCallInsideWhen.kt | 3 +- .../unsafeCallInsideWhen.kt.after | 3 +- .../unsafeCallInsideWhile.kt | 3 +- .../unsafeCallInsideWhile.kt.after | 3 +- .../codeinsight/GenerateK2QuickFixTests.kt | 13 +- 41 files changed, 1301 insertions(+), 955 deletions(-) create mode 100644 plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/SurroundWithNullCheckFixFactory.kt diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt index 147128f8a0b5..ee7360a58163 100644 --- a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt +++ b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt @@ -347,6 +347,18 @@ class KotlinK2QuickFixRegistrar : KotlinQuickFixRegistrar() { registerFactory(ActualAnnotationsNotMatchExpectFixFactory.factory) } + private val surroundWithNullCheck = KtQuickFixesListBuilder.registerPsiQuickFix { + registerFactory(SurroundWithNullCheckFixFactory.argumentTypeMismatchFactory) + registerFactory(SurroundWithNullCheckFixFactory.assignmentTypeMismatchFactory) + registerFactory(SurroundWithNullCheckFixFactory.iteratorOnNullableFactory) + registerFactory(SurroundWithNullCheckFixFactory.nullabilityMismatchBasedOnJavaAnnotationsFactory) + registerFactory(SurroundWithNullCheckFixFactory.receiverNullabilityMismatchBasedOnJavaAnnotationsFactory) + registerFactory(SurroundWithNullCheckFixFactory.unsafeCallFactory) + registerFactory(SurroundWithNullCheckFixFactory.unsafeImplicitInvokeCallFactory) + registerFactory(SurroundWithNullCheckFixFactory.unsafeInfixCallFactory) + registerFactory(SurroundWithNullCheckFixFactory.unsafeOperatorCallFactory) + } + override val list: KotlinQuickFixesList = KotlinQuickFixesList.createCombined( keywords, addAbstract, @@ -361,6 +373,7 @@ class KotlinK2QuickFixRegistrar : KotlinQuickFixRegistrar() { typeMismatch, needExplicitType, superKeyword, + surroundWithNullCheck, vararg, visibility, other, diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/SurroundWithNullCheckFixFactory.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/SurroundWithNullCheckFixFactory.kt new file mode 100644 index 000000000000..af34428ce841 --- /dev/null +++ b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/SurroundWithNullCheckFixFactory.kt @@ -0,0 +1,138 @@ +// 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.k2.codeinsight.fixes + +import com.intellij.modcommand.ActionContext +import com.intellij.modcommand.ModPsiUpdater +import com.intellij.psi.SmartPsiElementPointer +import com.intellij.psi.createSmartPointer +import org.jetbrains.kotlin.analysis.api.KtAnalysisSession +import org.jetbrains.kotlin.analysis.api.fir.diagnostics.KtFirDiagnostic +import org.jetbrains.kotlin.analysis.api.symbols.markers.KtNamedSymbol +import org.jetbrains.kotlin.idea.base.resources.KotlinBundle +import org.jetbrains.kotlin.idea.codeinsight.api.applicable.intentions.KotlinPsiUpdateModCommandAction +import org.jetbrains.kotlin.idea.codeinsight.api.applicators.fixes.KotlinQuickFixFactory +import org.jetbrains.kotlin.idea.codeinsight.utils.SurroundWithNullCheckUtils +import org.jetbrains.kotlin.idea.codeinsight.utils.SurroundWithNullCheckUtils.hasAcceptableParent +import org.jetbrains.kotlin.idea.references.mainReference +import org.jetbrains.kotlin.psi.KtDeclaration +import org.jetbrains.kotlin.psi.KtExpression +import org.jetbrains.kotlin.psi.KtOperationReferenceExpression +import org.jetbrains.kotlin.psi.KtReferenceExpression +import org.jetbrains.kotlin.psi.psiUtil.getParentOfType +import org.jetbrains.kotlin.psi.psiUtil.getParentOfTypesAndPredicate + +internal object SurroundWithNullCheckFixFactory { + + val argumentTypeMismatchFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KtFirDiagnostic.ArgumentTypeMismatch -> + if (!diagnostic.isMismatchDueToNullability) return@ModCommandBased emptyList() + createQuickFixIfApplicableToTypeMismatch(diagnostic) + } + + val assignmentTypeMismatchFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KtFirDiagnostic.AssignmentTypeMismatch -> + if (!diagnostic.isMismatchDueToNullability) return@ModCommandBased emptyList() + createQuickFixIfApplicableToTypeMismatch(diagnostic) + } + + val iteratorOnNullableFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KtFirDiagnostic.IteratorOnNullable -> + val nullableExpression = diagnostic.psi as? KtReferenceExpression ?: return@ModCommandBased emptyList() + val forExpression = SurroundWithNullCheckUtils.getForExpressionIfApplicable(nullableExpression) + ?: return@ModCommandBased emptyList() + val elementContext = ElementContext(nullableExpression.createSmartPointer()) + listOf( + SurroundWithNullCheckFix(forExpression, elementContext) + ) + } + + val nullabilityMismatchBasedOnJavaAnnotationsFactory = + KotlinQuickFixFactory.ModCommandBased { diagnostic: KtFirDiagnostic.NullabilityMismatchBasedOnJavaAnnotations -> + createQuickFixIfApplicableToTypeMismatch(diagnostic) + } + + val receiverNullabilityMismatchBasedOnJavaAnnotationsFactory = + KotlinQuickFixFactory.ModCommandBased { diagnostic: KtFirDiagnostic.ReceiverNullabilityMismatchBasedOnJavaAnnotations -> + createQuickFixIfApplicableToUnsafeCall(diagnostic) + } + + val unsafeCallFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KtFirDiagnostic.UnsafeCall -> + createQuickFixIfApplicableToUnsafeCall(diagnostic) + } + + val unsafeImplicitInvokeCallFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KtFirDiagnostic.UnsafeImplicitInvokeCall -> + createQuickFixIfApplicableToUnsafeCall(diagnostic) + } + + val unsafeInfixCallFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KtFirDiagnostic.UnsafeInfixCall -> + createQuickFixIfApplicableToUnsafeCall(diagnostic) + } + + val unsafeOperatorCallFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KtFirDiagnostic.UnsafeOperatorCall -> + createQuickFixIfApplicableToUnsafeCall(diagnostic) + } + + context(KtAnalysisSession) + private fun createQuickFixIfApplicableToUnsafeCall(diagnostic: KtFirDiagnostic<*>): List { + val element = when (diagnostic) { + is KtFirDiagnostic.UnsafeCall -> diagnostic.receiverExpression + else -> diagnostic.psi + } ?: return emptyList() + + val expressionParent = element.getParentOfType(strict = element is KtOperationReferenceExpression) + ?: return emptyList() + + val nullableExpression = SurroundWithNullCheckUtils.getNullableExpressionIfApplicable(element) ?: return emptyList() + + val expressionTarget = expressionParent.getParentOfTypesAndPredicate( + strict = false, parentClasses = arrayOf(KtExpression::class.java) + ) { + !it.isUsedAsExpression() && it.hasAcceptableParent() + } ?: return emptyList() + // Surround declaration (even of local variable) with null check is generally a bad idea + if (expressionTarget is KtDeclaration) return emptyList() + + val referenceSymbol = nullableExpression.mainReference.resolveToSymbol() as? KtNamedSymbol ?: return emptyList() + val file = expressionTarget.containingKtFile + val scope = file.getScopeContextForPosition(expressionTarget).getCompositeScope() + + val callableSymbol = scope.getCallableSymbols(referenceSymbol.name).firstOrNull() ?: return emptyList() + if (referenceSymbol != callableSymbol) return emptyList() + + val elementContext = ElementContext(nullableExpression.createSmartPointer()) + return listOf( + SurroundWithNullCheckFix(expressionTarget, elementContext) + ) + } + + context(KtAnalysisSession) + private fun createQuickFixIfApplicableToTypeMismatch(diagnostic: KtFirDiagnostic<*>): List { + val nullableExpression = diagnostic.psi as? KtReferenceExpression ?: return emptyList() + val root = SurroundWithNullCheckUtils.getRootExpressionIfApplicable(nullableExpression) ?: return emptyList() + val elementContext = ElementContext(nullableExpression.createSmartPointer()) + return listOf( + SurroundWithNullCheckFix(root, elementContext) + ) + } + + private data class ElementContext( + val nullableExpressionPointer: SmartPsiElementPointer, + ) + + private class SurroundWithNullCheckFix( + element: KtExpression, + elementContext: ElementContext, + ) : KotlinPsiUpdateModCommandAction.ElementBased(element, elementContext) { + + override fun invoke( + actionContext: ActionContext, + element: KtExpression, + elementContext: ElementContext, + updater: ModPsiUpdater, + ) { + val nullableExpression = elementContext.nullableExpressionPointer.element?.let(updater::getWritable) ?: return + SurroundWithNullCheckUtils.applyTo(actionContext.project, element, nullableExpression) + } + + override fun getFamilyName(): String { + return KotlinBundle.message("surround.with.null.check") + } + } +} diff --git a/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixMultiFileTestGenerated.java b/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixMultiFileTestGenerated.java index 9575ce642d74..08a730d14bea 100644 --- a/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixMultiFileTestGenerated.java +++ b/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixMultiFileTestGenerated.java @@ -17,933 +17,959 @@ import org.junit.runner.RunWith; @TestRoot("code-insight/fixes-k2/tests") @TestDataPath("$CONTENT_ROOT") @RunWith(JUnit3RunnerWithInners.class) -@TestMetadata("../../../idea/tests/testData/quickfix/autoImports") public abstract class HighLevelQuickFixMultiFileTestGenerated extends AbstractHighLevelQuickFixMultiFileTest { - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/callableReference") - public static class CallableReference extends AbstractHighLevelQuickFixMultiFileTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); - } - - @TestMetadata("abstractClass.test") - public void testAbstractClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/abstractClass.test"); - } - - @TestMetadata("annotation.test") - public void testAnnotation() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/annotation.test"); - } - - @TestMetadata("callableReferenceExtension.before.Main.kt") - public void testCallableReferenceExtension() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/callableReferenceExtension.before.Main.kt"); - } - - @TestMetadata("callableReferenceExtension2.before.Main.kt") - public void testCallableReferenceExtension2() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/callableReferenceExtension2.before.Main.kt"); - } - - @TestMetadata("callableReferenceTopLevel.before.Main.kt") - public void testCallableReferenceTopLevel() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/callableReferenceTopLevel.before.Main.kt"); - } - - @TestMetadata("constructorReference.before.Main.kt") - public void testConstructorReference() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/constructorReference.before.Main.kt"); - } - - @TestMetadata("enumClass.test") - public void testEnumClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/enumClass.test"); - } - - @TestMetadata("enumEntry.test") - public void testEnumEntry() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/enumEntry.test"); - } - - @TestMetadata("javaClass.test") - public void testJavaClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/javaClass.test"); - } - - @TestMetadata("noImportInterfaceRefAsConstructor.before.Main.kt") - public void testNoImportInterfaceRefAsConstructor() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/noImportInterfaceRefAsConstructor.before.Main.kt"); - } - - @TestMetadata("object.test") - public void testObject() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/object.test"); - } - - @TestMetadata("typealias.test") - public void testTypealias() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealias.test"); - } - - @TestMetadata("typealiasAnnotation.test") - public void testTypealiasAnnotation() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasAnnotation.test"); - } - - @TestMetadata("typealiasEnumClass.test") - public void testTypealiasEnumClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasEnumClass.test"); - } - - @TestMetadata("typealiasInterface.test") - public void testTypealiasInterface() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasInterface.test"); - } - - @TestMetadata("typealiasJavaClass.test") - public void testTypealiasJavaClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasJavaClass.test"); - } - - @TestMetadata("typealiasObject.test") - public void testTypealiasObject() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasObject.test"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/innerClass") - public static class InnerClass extends AbstractHighLevelQuickFixMultiFileTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); - } - - @TestMetadata("innerClassInCallableReference.test") - public void testInnerClassInCallableReference() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/innerClass/innerClassInCallableReference.test"); - } - - @TestMetadata("innerClassInExpression.test") - public void testInnerClassInExpression() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/innerClass/innerClassInExpression.test"); - } - - @TestMetadata("innerClassInTypeReference.test") - public void testInnerClassInTypeReference() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/innerClass/innerClassInTypeReference.test"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/invisible") - public static class Invisible extends AbstractHighLevelQuickFixMultiFileTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); - } - - @TestMetadata("annotation.before.Main.kt") - public void testAnnotation() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/annotation.before.Main.kt"); - } - - @TestMetadata("assignmentOperator.before.Main.kt") - public void testAssignmentOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/assignmentOperator.before.Main.kt"); - } - - @TestMetadata("class.before.Main.kt") - public void testClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/class.before.Main.kt"); - } - - @TestMetadata("fun.before.Main.kt") - public void testFun() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/fun.before.Main.kt"); - } - - @TestMetadata("property.before.Main.kt") - public void testProperty() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/property.before.Main.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/kt21515") - public static class Kt21515 extends AbstractHighLevelQuickFixMultiFileTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); - } - - @TestMetadata("staticFromJava.test") - public void testStaticFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/kt21515/staticFromJava.test"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs") - public static class MismatchingArgs extends AbstractHighLevelQuickFixMultiFileTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); - } - - @TestMetadata("constantExpectedTypeMismatch.test") - public void testConstantExpectedTypeMismatch() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/constantExpectedTypeMismatch.test"); - } - - @TestMetadata("expectedTypeRequired.test") - public void testExpectedTypeRequired() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/expectedTypeRequired.test"); - } - - @TestMetadata("extensionExplicitReceiver.test") - public void testExtensionExplicitReceiver() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionExplicitReceiver.test"); - } - - @TestMetadata("extensionImplicitReceiver.test") - public void testExtensionImplicitReceiver() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionImplicitReceiver.test"); - } - - @TestMetadata("extensionOperator.before.Main.kt") - public void testExtensionOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionOperator.before.Main.kt"); - } - - @TestMetadata("extensionWrongReceiver.test") - public void testExtensionWrongReceiver() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionWrongReceiver.test"); - } - - @TestMetadata("extensionWrongTypeParam.test") - public void testExtensionWrongTypeParam() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionWrongTypeParam.test"); - } - - @TestMetadata("extensionWrongTypeParam2.test") - public void testExtensionWrongTypeParam2() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionWrongTypeParam2.test"); - } - - @TestMetadata("extensionWrongTypeParam3.test") - public void testExtensionWrongTypeParam3() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionWrongTypeParam3.test"); - } - - @TestMetadata("ignoreErrorsOutsideCall.test") - public void testIgnoreErrorsOutsideCall() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/ignoreErrorsOutsideCall.test"); - } - - @TestMetadata("namedArgument.test") - public void testNamedArgument() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/namedArgument.test"); - } - - @TestMetadata("smartCast.test") - public void testSmartCast() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/smartCast.test"); - } - - @TestMetadata("topLevelFun.test") - public void testTopLevelFun() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/topLevelFun.test"); - } - - @TestMetadata("topLevelFun_notWithReceiver.test") - public void testTopLevelFun_notWithReceiver() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/topLevelFun_notWithReceiver.test"); - } - - @TestMetadata("typeMismatch.test") - public void testTypeMismatch() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/typeMismatch.test"); - } - } - @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("../../../idea/tests/testData/quickfix/autoImports") - public static class Uncategorized extends AbstractHighLevelQuickFixMultiFileTest { + public abstract static class AutoImports extends AbstractHighLevelQuickFixMultiFileTest { + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/callableReference") + public static class CallableReference extends AbstractHighLevelQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); + } + + @TestMetadata("abstractClass.test") + public void testAbstractClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/abstractClass.test"); + } + + @TestMetadata("annotation.test") + public void testAnnotation() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/annotation.test"); + } + + @TestMetadata("callableReferenceExtension.before.Main.kt") + public void testCallableReferenceExtension() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/callableReferenceExtension.before.Main.kt"); + } + + @TestMetadata("callableReferenceExtension2.before.Main.kt") + public void testCallableReferenceExtension2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/callableReferenceExtension2.before.Main.kt"); + } + + @TestMetadata("callableReferenceTopLevel.before.Main.kt") + public void testCallableReferenceTopLevel() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/callableReferenceTopLevel.before.Main.kt"); + } + + @TestMetadata("constructorReference.before.Main.kt") + public void testConstructorReference() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/constructorReference.before.Main.kt"); + } + + @TestMetadata("enumClass.test") + public void testEnumClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/enumClass.test"); + } + + @TestMetadata("enumEntry.test") + public void testEnumEntry() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/enumEntry.test"); + } + + @TestMetadata("javaClass.test") + public void testJavaClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/javaClass.test"); + } + + @TestMetadata("noImportInterfaceRefAsConstructor.before.Main.kt") + public void testNoImportInterfaceRefAsConstructor() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/noImportInterfaceRefAsConstructor.before.Main.kt"); + } + + @TestMetadata("object.test") + public void testObject() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/object.test"); + } + + @TestMetadata("typealias.test") + public void testTypealias() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealias.test"); + } + + @TestMetadata("typealiasAnnotation.test") + public void testTypealiasAnnotation() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasAnnotation.test"); + } + + @TestMetadata("typealiasEnumClass.test") + public void testTypealiasEnumClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasEnumClass.test"); + } + + @TestMetadata("typealiasInterface.test") + public void testTypealiasInterface() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasInterface.test"); + } + + @TestMetadata("typealiasJavaClass.test") + public void testTypealiasJavaClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasJavaClass.test"); + } + + @TestMetadata("typealiasObject.test") + public void testTypealiasObject() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callableReference/typealiasObject.test"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/innerClass") + public static class InnerClass extends AbstractHighLevelQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); + } + + @TestMetadata("innerClassInCallableReference.test") + public void testInnerClassInCallableReference() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/innerClass/innerClassInCallableReference.test"); + } + + @TestMetadata("innerClassInExpression.test") + public void testInnerClassInExpression() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/innerClass/innerClassInExpression.test"); + } + + @TestMetadata("innerClassInTypeReference.test") + public void testInnerClassInTypeReference() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/innerClass/innerClassInTypeReference.test"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/invisible") + public static class Invisible extends AbstractHighLevelQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); + } + + @TestMetadata("annotation.before.Main.kt") + public void testAnnotation() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/annotation.before.Main.kt"); + } + + @TestMetadata("assignmentOperator.before.Main.kt") + public void testAssignmentOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/assignmentOperator.before.Main.kt"); + } + + @TestMetadata("class.before.Main.kt") + public void testClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/class.before.Main.kt"); + } + + @TestMetadata("fun.before.Main.kt") + public void testFun() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/fun.before.Main.kt"); + } + + @TestMetadata("property.before.Main.kt") + public void testProperty() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/invisible/property.before.Main.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/kt21515") + public static class Kt21515 extends AbstractHighLevelQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); + } + + @TestMetadata("staticFromJava.test") + public void testStaticFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/kt21515/staticFromJava.test"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs") + public static class MismatchingArgs extends AbstractHighLevelQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); + } + + @TestMetadata("constantExpectedTypeMismatch.test") + public void testConstantExpectedTypeMismatch() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/constantExpectedTypeMismatch.test"); + } + + @TestMetadata("expectedTypeRequired.test") + public void testExpectedTypeRequired() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/expectedTypeRequired.test"); + } + + @TestMetadata("extensionExplicitReceiver.test") + public void testExtensionExplicitReceiver() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionExplicitReceiver.test"); + } + + @TestMetadata("extensionImplicitReceiver.test") + public void testExtensionImplicitReceiver() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionImplicitReceiver.test"); + } + + @TestMetadata("extensionOperator.before.Main.kt") + public void testExtensionOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionOperator.before.Main.kt"); + } + + @TestMetadata("extensionWrongReceiver.test") + public void testExtensionWrongReceiver() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionWrongReceiver.test"); + } + + @TestMetadata("extensionWrongTypeParam.test") + public void testExtensionWrongTypeParam() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionWrongTypeParam.test"); + } + + @TestMetadata("extensionWrongTypeParam2.test") + public void testExtensionWrongTypeParam2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionWrongTypeParam2.test"); + } + + @TestMetadata("extensionWrongTypeParam3.test") + public void testExtensionWrongTypeParam3() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/extensionWrongTypeParam3.test"); + } + + @TestMetadata("ignoreErrorsOutsideCall.test") + public void testIgnoreErrorsOutsideCall() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/ignoreErrorsOutsideCall.test"); + } + + @TestMetadata("namedArgument.test") + public void testNamedArgument() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/namedArgument.test"); + } + + @TestMetadata("smartCast.test") + public void testSmartCast() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/smartCast.test"); + } + + @TestMetadata("topLevelFun.test") + public void testTopLevelFun() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/topLevelFun.test"); + } + + @TestMetadata("topLevelFun_notWithReceiver.test") + public void testTopLevelFun_notWithReceiver() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/topLevelFun_notWithReceiver.test"); + } + + @TestMetadata("typeMismatch.test") + public void testTypeMismatch() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/mismatchingArgs/typeMismatch.test"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/autoImports") + public static class Uncategorized extends AbstractHighLevelQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); + } + + @TestMetadata("ambiguousNamePreferFromJdk.before.Main.kt") + public void testAmbiguousNamePreferFromJdk() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/ambiguousNamePreferFromJdk.before.Main.kt"); + } + + @TestMetadata("ambiguousNamePreferWithImportsFromPackage.before.Main.kt") + public void testAmbiguousNamePreferWithImportsFromPackage() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/ambiguousNamePreferWithImportsFromPackage.before.Main.kt"); + } + + @TestMetadata("annotation2.test") + public void testAnnotation2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/annotation2.test"); + } + + @TestMetadata("annotationOuterClass.test") + public void testAnnotationOuterClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/annotationOuterClass.test"); + } + + @TestMetadata("annotationTypeAlias.test") + public void testAnnotationTypeAlias() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/annotationTypeAlias.test"); + } + + @TestMetadata("annotationTypeAlias2.test") + public void testAnnotationTypeAlias2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/annotationTypeAlias2.test"); + } + + @TestMetadata("callWithTrailingComma.before.Main.kt") + public void testCallWithTrailingComma() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/callWithTrailingComma.before.Main.kt"); + } + + @TestMetadata("classImport.before.Main.kt") + public void testClassImport() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/classImport.before.Main.kt"); + } + + @TestMetadata("constructorParameterAnnotation.test") + public void testConstructorParameterAnnotation() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/constructorParameterAnnotation.test"); + } + + @TestMetadata("delegateExtensionBoth.test") + public void testDelegateExtensionBoth() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/delegateExtensionBoth.test"); + } + + @TestMetadata("delegateExtensionGet.test") + public void testDelegateExtensionGet() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/delegateExtensionGet.test"); + } + + @TestMetadata("delegateExtensionProvideDelegate.test") + public void testDelegateExtensionProvideDelegate() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/delegateExtensionProvideDelegate.test"); + } + + @TestMetadata("delegateExtensionSet.test") + public void testDelegateExtensionSet() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/delegateExtensionSet.test"); + } + + @TestMetadata("delegateGetValueFunction.before.Main.kt") + public void testDelegateGetValueFunction() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/delegateGetValueFunction.before.Main.kt"); + } + + @TestMetadata("delegateNoOperator.test") + public void testDelegateNoOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/delegateNoOperator.test"); + } + + @TestMetadata("divOperator.before.Main.kt") + public void testDivOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/divOperator.before.Main.kt"); + } + + @TestMetadata("dslMarkers.before.Main.kt") + public void testDslMarkers() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/dslMarkers.before.Main.kt"); + } + + @TestMetadata("dslMarkersOnReceiver.before.Main.kt") + public void testDslMarkersOnReceiver() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/dslMarkersOnReceiver.before.Main.kt"); + } + + @TestMetadata("extensionFunctionImport.before.Main.kt") + public void testExtensionFunctionImport() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/extensionFunctionImport.before.Main.kt"); + } + + @TestMetadata("extensionFunctionImportImplicitReceiver.before.Main.kt") + public void testExtensionFunctionImportImplicitReceiver() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/extensionFunctionImportImplicitReceiver.before.Main.kt"); + } + + @TestMetadata("extensionFunctionWithGenericImport.before.Main.kt") + public void testExtensionFunctionWithGenericImport() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/extensionFunctionWithGenericImport.before.Main.kt"); + } + + @TestMetadata("extensionPreferDeprecatedSinceApplicable.test") + public void testExtensionPreferDeprecatedSinceApplicable() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPreferDeprecatedSinceApplicable.test"); + } + + @TestMetadata("extensionPreferDeprecatedSinceNotApplicable.test") + public void testExtensionPreferDeprecatedSinceNotApplicable() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPreferDeprecatedSinceNotApplicable.test"); + } + + @TestMetadata("extensionPropertyImport.before.Main.kt") + public void testExtensionPropertyImport() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPropertyImport.before.Main.kt"); + } + + @TestMetadata("extensionPropertyOnTypeAliasFromExpansion.before.Main.kt") + public void testExtensionPropertyOnTypeAliasFromExpansion() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromExpansion.before.Main.kt"); + } + + @TestMetadata("extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt") + public void testExtensionPropertyOnTypeAliasFromOtherTypeAlias() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt"); + } + + @TestMetadata("factoryFunctionFromLambda.before.Main.kt") + public void testFactoryFunctionFromLambda() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/factoryFunctionFromLambda.before.Main.kt"); + } + + @TestMetadata("falsePostfixOperator.before.Main.kt") + public void testFalsePostfixOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt"); + } + + @TestMetadata("functionImport.before.Main.kt") + public void testFunctionImport() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/functionImport.before.Main.kt"); + } + + @TestMetadata("functionPreferNotDeprecated.test") + public void testFunctionPreferNotDeprecated() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/functionPreferNotDeprecated.test"); + } + + @TestMetadata("importAliasClassAlreadyExists.before.Main.kt") + public void testImportAliasClassAlreadyExists() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasClassAlreadyExists.before.Main.kt"); + } + + @TestMetadata("importAliasClassAlreadyExistsCollision.before.Main.kt") + public void testImportAliasClassAlreadyExistsCollision() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasClassAlreadyExistsCollision.before.Main.kt"); + } + + @TestMetadata("importAliasFunctionAlreadyExists.before.Main.kt") + public void testImportAliasFunctionAlreadyExists() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasFunctionAlreadyExists.before.Main.kt"); + } + + @TestMetadata("importAliasFunctionAlreadyExistsCollision.before.Main.kt") + public void testImportAliasFunctionAlreadyExistsCollision() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasFunctionAlreadyExistsCollision.before.Main.kt"); + } + + @TestMetadata("importAliasPropertyAlreadyExists.before.Main.kt") + public void testImportAliasPropertyAlreadyExists() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasPropertyAlreadyExists.before.Main.kt"); + } + + @TestMetadata("importClass.before.Main.kt") + public void testImportClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importClass.before.Main.kt"); + } + + @TestMetadata("importDelegateFunctions.before.Main.kt") + public void testImportDelegateFunctions() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importDelegateFunctions.before.Main.kt"); + } + + @TestMetadata("importFromRoot.before.Main.kt") + public void testImportFromRoot() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importFromRoot.before.Main.kt"); + } + + @TestMetadata("importFunctionWithDefinitelyNotNullType.before.Main.kt") + public void testImportFunctionWithDefinitelyNotNullType() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importFunctionWithDefinitelyNotNullType.before.Main.kt"); + } + + @TestMetadata("importGetValueExtensionForDelegateInsideRun.before.Main.kt") + public void testImportGetValueExtensionForDelegateInsideRun() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importGetValueExtensionForDelegateInsideRun.before.Main.kt"); + } + + @TestMetadata("importGetValueExtensionForDelegateWithLambda.before.Main.kt") + public void testImportGetValueExtensionForDelegateWithLambda() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importGetValueExtensionForDelegateWithLambda.before.Main.kt"); + } + + @TestMetadata("importInFirstPartInQualifiedExpression.before.Main.kt") + public void testImportInFirstPartInQualifiedExpression() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.Main.kt"); + } + + @TestMetadata("importInFirstPartInUserType.test") + public void testImportInFirstPartInUserType() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importInFirstPartInUserType.test"); + } + + @TestMetadata("importInterface.before.Main.kt") + public void testImportInterface() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importInterface.before.Main.kt"); + } + + @TestMetadata("importKotlinCompanionPropertyAsFieldFromJava.test") + public void testImportKotlinCompanionPropertyAsFieldFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionPropertyAsFieldFromJava.test"); + } + + @TestMetadata("importKotlinCompanionStaticFunctionFromJava.test") + public void testImportKotlinCompanionStaticFunctionFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticFunctionFromJava.test"); + } + + @TestMetadata("importKotlinCompanionStaticPropertyDefaultGetterFromJava.test") + public void testImportKotlinCompanionStaticPropertyDefaultGetterFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultGetterFromJava.test"); + } + + @TestMetadata("importKotlinCompanionStaticPropertyDefaultSetterFromJava.test") + public void testImportKotlinCompanionStaticPropertyDefaultSetterFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultSetterFromJava.test"); + } + + @TestMetadata("importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test") + public void testImportKotlinCompanionStaticPropertyOverloadedGetterFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test"); + } + + @TestMetadata("importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test") + public void testImportKotlinCompanionStaticPropertyOverloadedSetterFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test"); + } + + @TestMetadata("importKotlinPropertyAsFieldFromJava.test") + public void testImportKotlinPropertyAsFieldFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinPropertyAsFieldFromJava.test"); + } + + @TestMetadata("importKotlinStaticFunctionFromJava.test") + public void testImportKotlinStaticFunctionFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticFunctionFromJava.test"); + } + + @TestMetadata("importKotlinStaticPropertyDefaultGetterFromJava.test") + public void testImportKotlinStaticPropertyDefaultGetterFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultGetterFromJava.test"); + } + + @TestMetadata("importKotlinStaticPropertyDefaultSetterFromJava.test") + public void testImportKotlinStaticPropertyDefaultSetterFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultSetterFromJava.test"); + } + + @TestMetadata("importKotlinStaticPropertyOverloadedGetterFromJava.test") + public void testImportKotlinStaticPropertyOverloadedGetterFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedGetterFromJava.test"); + } + + @TestMetadata("importKotlinStaticPropertyOverloadedSetterFromJava.test") + public void testImportKotlinStaticPropertyOverloadedSetterFromJava() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedSetterFromJava.test"); + } + + @TestMetadata("importNullableInterfaceWithGenerics.before.Main.kt") + public void testImportNullableInterfaceWithGenerics() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/importNullableInterfaceWithGenerics.before.Main.kt"); + } + + @TestMetadata("ImportOperatorInvokeWithConvention.before.Main.kt") + public void testImportOperatorInvokeWithConvention() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/ImportOperatorInvokeWithConvention.before.Main.kt"); + } + + @TestMetadata("indexCallExtensionGet.test") + public void testIndexCallExtensionGet() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionGet.test"); + } + + @TestMetadata("indexCallExtensionGetNoOperator.test") + public void testIndexCallExtensionGetNoOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test"); + } + + @TestMetadata("indexCallExtensionImportGetOnNoOperatorWarning.test") + public void testIndexCallExtensionImportGetOnNoOperatorWarning() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test"); + } + + @TestMetadata("indexCallExtensionImportSetOnNoOperatorWarning.test") + public void testIndexCallExtensionImportSetOnNoOperatorWarning() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test"); + } + + @TestMetadata("indexCallExtensionSet.test") + public void testIndexCallExtensionSet() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionSet.test"); + } + + @TestMetadata("indexCallNoImportWhenGetNeededButSetAvailable.test") + public void testIndexCallNoImportWhenGetNeededButSetAvailable() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test"); + } + + @TestMetadata("indexCallNoImportWhenSetNeededButGetAvailable.test") + public void testIndexCallNoImportWhenSetNeededButGetAvailable() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test"); + } + + @TestMetadata("infixCall.before.Main.kt") + public void testInfixCall() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/infixCall.before.Main.kt"); + } + + @TestMetadata("infixCall2.before.Main.kt") + public void testInfixCall2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/infixCall2.before.Main.kt"); + } + + @TestMetadata("invokeExtension.test") + public void testInvokeExtension() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/invokeExtension.test"); + } + + @TestMetadata("invokeExtension2.test") + public void testInvokeExtension2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/invokeExtension2.test"); + } + + @TestMetadata("invokeExtensionNoOperator.test") + public void testInvokeExtensionNoOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/invokeExtensionNoOperator.test"); + } + + @TestMetadata("iteratorOperator.before.Main.kt") + public void testIteratorOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/iteratorOperator.before.Main.kt"); + } + + @TestMetadata("ktij27440.test") + public void testKtij27440() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/ktij27440.test"); + } + + @TestMetadata("memberImportFunction.test") + public void testMemberImportFunction() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportFunction.test"); + } + + @TestMetadata("memberImportJavaField.test") + public void testMemberImportJavaField() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportJavaField.test"); + } + + @TestMetadata("memberImportJavaMethod.test") + public void testMemberImportJavaMethod() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportJavaMethod.test"); + } + + @TestMetadata("memberImportNotForClassFunction.test") + public void testMemberImportNotForClassFunction() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForClassFunction.test"); + } + + @TestMetadata("memberImportNotForClassProperty.test") + public void testMemberImportNotForClassProperty() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForClassProperty.test"); + } + + @TestMetadata("memberImportNotForJavaNonStaticField.test") + public void testMemberImportNotForJavaNonStaticField() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test"); + } + + @TestMetadata("memberImportNotForJavaNonStaticMethod.test") + public void testMemberImportNotForJavaNonStaticMethod() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test"); + } + + @TestMetadata("memberImportNotForTopLevelFunction.test") + public void testMemberImportNotForTopLevelFunction() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test"); + } + + @TestMetadata("memberImportProperty.test") + public void testMemberImportProperty() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportProperty.test"); + } + + @TestMetadata("memberWithTopLevelConflict.before.Main.kt") + public void testMemberWithTopLevelConflict() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/memberWithTopLevelConflict.before.Main.kt"); + } + + @TestMetadata("minusOperator.before.Main.kt") + public void testMinusOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/minusOperator.before.Main.kt"); + } + + @TestMetadata("multiDeclarationExtensionAllComponents.test") + public void testMultiDeclarationExtensionAllComponents() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionAllComponents.test"); + } + + @TestMetadata("multiDeclarationExtensionAllComponentsMany.test") + public void testMultiDeclarationExtensionAllComponentsMany() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsMany.test"); + } + + @TestMetadata("multiDeclarationExtensionAllComponentsPrefereFull.test") + public void testMultiDeclarationExtensionAllComponentsPrefereFull() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereFull.test"); + } + + @TestMetadata("multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test") + public void testMultiDeclarationExtensionAllComponentsPrefereNotDeprecated() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test"); + } + + @TestMetadata("multiDeclarationExtensionComponent1.test") + public void testMultiDeclarationExtensionComponent1() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponent1.test"); + } + + @TestMetadata("multiDeclarationExtensionComponent2.test") + public void testMultiDeclarationExtensionComponent2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponent2.test"); + } + + @TestMetadata("multiDeclarationExtensionComponentNoOperator.test") + public void testMultiDeclarationExtensionComponentNoOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test"); + } + + @TestMetadata("multiFunctionCandidate.test") + public void testMultiFunctionCandidate() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/multiFunctionCandidate.test"); + } + + @TestMetadata("nestedClass.before.Main.kt") + public void testNestedClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/nestedClass.before.Main.kt"); + } + + @TestMetadata("noFunctionImportOnSimpleName.test") + public void testNoFunctionImportOnSimpleName() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test"); + } + + @TestMetadata("noImportForCallableInConstructorCall.test") + public void testNoImportForCallableInConstructorCall() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForCallableInConstructorCall.test"); + } + + @TestMetadata("noImportForCallableInTypeReference.test") + public void testNoImportForCallableInTypeReference() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForCallableInTypeReference.test"); + } + + @TestMetadata("noImportForFunInQualifiedNotFirst.before.Main.kt") + public void testNoImportForFunInQualifiedNotFirst() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt"); + } + + @TestMetadata("noImportForNestedInPrivate.before.Main.kt") + public void testNoImportForNestedInPrivate() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt"); + } + + @TestMetadata("noImportForPrivateClass.before.Main.kt") + public void testNoImportForPrivateClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt"); + } + + @TestMetadata("noImportForPrivateFunction.before.Main.kt") + public void testNoImportForPrivateFunction() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForPrivateFunction.before.Main.kt"); + } + + @TestMetadata("noImportInImports.before.Main.kt") + public void testNoImportInImports() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportInImports.before.Main.kt"); + } + + @TestMetadata("noImportInQualifiedExpressionNotFirst.before.Main.kt") + public void testNoImportInQualifiedExpressionNotFirst() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt"); + } + + @TestMetadata("noImportInQualifiedUserTypeNotFirst.before.Main.kt") + public void testNoImportInQualifiedUserTypeNotFirst() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportInQualifiedUserTypeNotFirst.before.Main.kt"); + } + + @TestMetadata("noImportInSafeQualifiedExpressionNotFirst.before.Main.kt") + public void testNoImportInSafeQualifiedExpressionNotFirst() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt"); + } + + @TestMetadata("noImportOfExtensionForReferenceWithPackageQualifier.test") + public void testNoImportOfExtensionForReferenceWithPackageQualifier() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportOfExtensionForReferenceWithPackageQualifier.test"); + } + + @TestMetadata("noImportOfExtensionWhenMatchingReceiverIsMissing.test") + public void testNoImportOfExtensionWhenMatchingReceiverIsMissing() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportOfExtensionWhenMatchingReceiverIsMissing.test"); + } + + @TestMetadata("noImportOfNonAnnotationClass.test") + public void testNoImportOfNonAnnotationClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportOfNonAnnotationClass.test"); + } + + @TestMetadata("noImportsForClassInExcludedPackage.before.Main.kt") + public void testNoImportsForClassInExcludedPackage() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportsForClassInExcludedPackage.before.Main.kt"); + } + + @TestMetadata("noImportsForExcludedClass.before.Main.kt") + public void testNoImportsForExcludedClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportsForExcludedClass.before.Main.kt"); + } + + @TestMetadata("noImportsForFunctionInExcludedPackage.before.Main.kt") + public void testNoImportsForFunctionInExcludedPackage() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noImportsForFunctionInExcludedPackage.before.Main.kt"); + } + + @TestMetadata("noMemberFunctionImportOnSimpleName.test") + public void testNoMemberFunctionImportOnSimpleName() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test"); + } + + @TestMetadata("noneApplicableFromInstanceButExtension.before.Main.kt") + public void testNoneApplicableFromInstanceButExtension() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/noneApplicableFromInstanceButExtension.before.Main.kt"); + } + + @TestMetadata("notExcludedClass.before.Main.kt") + public void testNotExcludedClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/notExcludedClass.before.Main.kt"); + } + + @TestMetadata("objectImport.before.Main.kt") + public void testObjectImport() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/objectImport.before.Main.kt"); + } + + @TestMetadata("objectMemberFunctionImportWhenReceiverPresent.before.Main.kt") + public void testObjectMemberFunctionImportWhenReceiverPresent() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/objectMemberFunctionImportWhenReceiverPresent.before.Main.kt"); + } + + @TestMetadata("operatorAssignPlus.test") + public void testOperatorAssignPlus() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/operatorAssignPlus.test"); + } + + @TestMetadata("operatorAssignPlusAssign.test") + public void testOperatorAssignPlusAssign() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/operatorAssignPlusAssign.test"); + } + + @TestMetadata("operatorAssignPlusTwoVariantsDifferentPackages.test") + public void testOperatorAssignPlusTwoVariantsDifferentPackages() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/operatorAssignPlusTwoVariantsDifferentPackages.test"); + } + + @TestMetadata("packageClass.before.Main.kt") + public void testPackageClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/packageClass.before.Main.kt"); + } + + @TestMetadata("plusOperator.before.Main.kt") + public void testPlusOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/plusOperator.before.Main.kt"); + } + + @TestMetadata("plusOperatorWithTypeMismatch.before.Main.kt") + public void testPlusOperatorWithTypeMismatch() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt"); + } + + @TestMetadata("postfixOperator.before.Main.kt") + public void testPostfixOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/postfixOperator.before.Main.kt"); + } + + @TestMetadata("propertyImport.before.Main.kt") + public void testPropertyImport() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/propertyImport.before.Main.kt"); + } + + @TestMetadata("sameModuleImportPriority.before.Main.kt") + public void testSameModuleImportPriority() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/sameModuleImportPriority.before.Main.kt"); + } + + @TestMetadata("sealedClass.test") + public void testSealedClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/sealedClass.test"); + } + + @TestMetadata("sealedClass2.test") + public void testSealedClass2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/sealedClass2.test"); + } + + @TestMetadata("timesAssign.before.Main.kt") + public void testTimesAssign() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/timesAssign.before.Main.kt"); + } + + @TestMetadata("typeAliasConstructorImport.test") + public void testTypeAliasConstructorImport() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasConstructorImport.test"); + } + + @TestMetadata("typeAliasExtensionFunction.before.Main.kt") + public void testTypeAliasExtensionFunction() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasExtensionFunction.before.Main.kt"); + } + + @TestMetadata("typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt") + public void testTypeAliasExtensionFunctionInTypeAliasChain() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt"); + } + + @TestMetadata("typeAliasExtensionProperty.before.Main.kt") + public void testTypeAliasExtensionProperty() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasExtensionProperty.before.Main.kt"); + } + + @TestMetadata("typeAliasImport.before.Main.kt") + public void testTypeAliasImport() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasImport.before.Main.kt"); + } + + @TestMetadata("unaryMinusOperator.before.Main.kt") + public void testUnaryMinusOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/unaryMinusOperator.before.Main.kt"); + } + + @TestMetadata("unaryPlusOperator.before.Main.kt") + public void testUnaryPlusOperator() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/unaryPlusOperator.before.Main.kt"); + } + + @TestMetadata("unresolvedImplicitReceiver.test") + public void testUnresolvedImplicitReceiver() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/unresolvedImplicitReceiver.test"); + } + + @TestMetadata("withSmartCastQualifier.before.Main.kt") + public void testWithSmartCastQualifier() throws Exception { + runTest("../../../idea/tests/testData/quickfix/autoImports/withSmartCastQualifier.before.Main.kt"); + } + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/surroundWithNullCheck") + public static class SurroundWithNullCheck extends AbstractHighLevelQuickFixMultiFileTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); } - @TestMetadata("ambiguousNamePreferFromJdk.before.Main.kt") - public void testAmbiguousNamePreferFromJdk() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/ambiguousNamePreferFromJdk.before.Main.kt"); + @TestMetadata("javaNullabilityArgument.test") + public void testJavaNullabilityArgument() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/javaNullabilityArgument.test"); } - @TestMetadata("ambiguousNamePreferWithImportsFromPackage.before.Main.kt") - public void testAmbiguousNamePreferWithImportsFromPackage() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/ambiguousNamePreferWithImportsFromPackage.before.Main.kt"); + @TestMetadata("javaReceiverNullability.test") + public void testJavaReceiverNullability() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/javaReceiverNullability.test"); } - @TestMetadata("annotation2.test") - public void testAnnotation2() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/annotation2.test"); - } - - @TestMetadata("annotationOuterClass.test") - public void testAnnotationOuterClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/annotationOuterClass.test"); - } - - @TestMetadata("annotationTypeAlias.test") - public void testAnnotationTypeAlias() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/annotationTypeAlias.test"); - } - - @TestMetadata("annotationTypeAlias2.test") - public void testAnnotationTypeAlias2() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/annotationTypeAlias2.test"); - } - - @TestMetadata("callWithTrailingComma.before.Main.kt") - public void testCallWithTrailingComma() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/callWithTrailingComma.before.Main.kt"); - } - - @TestMetadata("classImport.before.Main.kt") - public void testClassImport() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/classImport.before.Main.kt"); - } - - @TestMetadata("constructorParameterAnnotation.test") - public void testConstructorParameterAnnotation() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/constructorParameterAnnotation.test"); - } - - @TestMetadata("delegateExtensionBoth.test") - public void testDelegateExtensionBoth() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/delegateExtensionBoth.test"); - } - - @TestMetadata("delegateExtensionGet.test") - public void testDelegateExtensionGet() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/delegateExtensionGet.test"); - } - - @TestMetadata("delegateExtensionProvideDelegate.test") - public void testDelegateExtensionProvideDelegate() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/delegateExtensionProvideDelegate.test"); - } - - @TestMetadata("delegateExtensionSet.test") - public void testDelegateExtensionSet() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/delegateExtensionSet.test"); - } - - @TestMetadata("delegateGetValueFunction.before.Main.kt") - public void testDelegateGetValueFunction() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/delegateGetValueFunction.before.Main.kt"); - } - - @TestMetadata("delegateNoOperator.test") - public void testDelegateNoOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/delegateNoOperator.test"); - } - - @TestMetadata("divOperator.before.Main.kt") - public void testDivOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/divOperator.before.Main.kt"); - } - - @TestMetadata("dslMarkers.before.Main.kt") - public void testDslMarkers() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/dslMarkers.before.Main.kt"); - } - - @TestMetadata("dslMarkersOnReceiver.before.Main.kt") - public void testDslMarkersOnReceiver() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/dslMarkersOnReceiver.before.Main.kt"); - } - - @TestMetadata("extensionFunctionImport.before.Main.kt") - public void testExtensionFunctionImport() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/extensionFunctionImport.before.Main.kt"); - } - - @TestMetadata("extensionFunctionImportImplicitReceiver.before.Main.kt") - public void testExtensionFunctionImportImplicitReceiver() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/extensionFunctionImportImplicitReceiver.before.Main.kt"); - } - - @TestMetadata("extensionFunctionWithGenericImport.before.Main.kt") - public void testExtensionFunctionWithGenericImport() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/extensionFunctionWithGenericImport.before.Main.kt"); - } - - @TestMetadata("extensionPreferDeprecatedSinceApplicable.test") - public void testExtensionPreferDeprecatedSinceApplicable() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPreferDeprecatedSinceApplicable.test"); - } - - @TestMetadata("extensionPreferDeprecatedSinceNotApplicable.test") - public void testExtensionPreferDeprecatedSinceNotApplicable() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPreferDeprecatedSinceNotApplicable.test"); - } - - @TestMetadata("extensionPropertyImport.before.Main.kt") - public void testExtensionPropertyImport() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPropertyImport.before.Main.kt"); - } - - @TestMetadata("extensionPropertyOnTypeAliasFromExpansion.before.Main.kt") - public void testExtensionPropertyOnTypeAliasFromExpansion() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromExpansion.before.Main.kt"); - } - - @TestMetadata("extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt") - public void testExtensionPropertyOnTypeAliasFromOtherTypeAlias() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt"); - } - - @TestMetadata("factoryFunctionFromLambda.before.Main.kt") - public void testFactoryFunctionFromLambda() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/factoryFunctionFromLambda.before.Main.kt"); - } - - @TestMetadata("falsePostfixOperator.before.Main.kt") - public void testFalsePostfixOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt"); - } - - @TestMetadata("functionImport.before.Main.kt") - public void testFunctionImport() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/functionImport.before.Main.kt"); - } - - @TestMetadata("functionPreferNotDeprecated.test") - public void testFunctionPreferNotDeprecated() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/functionPreferNotDeprecated.test"); - } - - @TestMetadata("importAliasClassAlreadyExists.before.Main.kt") - public void testImportAliasClassAlreadyExists() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasClassAlreadyExists.before.Main.kt"); - } - - @TestMetadata("importAliasClassAlreadyExistsCollision.before.Main.kt") - public void testImportAliasClassAlreadyExistsCollision() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasClassAlreadyExistsCollision.before.Main.kt"); - } - - @TestMetadata("importAliasFunctionAlreadyExists.before.Main.kt") - public void testImportAliasFunctionAlreadyExists() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasFunctionAlreadyExists.before.Main.kt"); - } - - @TestMetadata("importAliasFunctionAlreadyExistsCollision.before.Main.kt") - public void testImportAliasFunctionAlreadyExistsCollision() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasFunctionAlreadyExistsCollision.before.Main.kt"); - } - - @TestMetadata("importAliasPropertyAlreadyExists.before.Main.kt") - public void testImportAliasPropertyAlreadyExists() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importAliasPropertyAlreadyExists.before.Main.kt"); - } - - @TestMetadata("importClass.before.Main.kt") - public void testImportClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importClass.before.Main.kt"); - } - - @TestMetadata("importDelegateFunctions.before.Main.kt") - public void testImportDelegateFunctions() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importDelegateFunctions.before.Main.kt"); - } - - @TestMetadata("importFromRoot.before.Main.kt") - public void testImportFromRoot() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importFromRoot.before.Main.kt"); - } - - @TestMetadata("importFunctionWithDefinitelyNotNullType.before.Main.kt") - public void testImportFunctionWithDefinitelyNotNullType() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importFunctionWithDefinitelyNotNullType.before.Main.kt"); - } - - @TestMetadata("importGetValueExtensionForDelegateInsideRun.before.Main.kt") - public void testImportGetValueExtensionForDelegateInsideRun() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importGetValueExtensionForDelegateInsideRun.before.Main.kt"); - } - - @TestMetadata("importGetValueExtensionForDelegateWithLambda.before.Main.kt") - public void testImportGetValueExtensionForDelegateWithLambda() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importGetValueExtensionForDelegateWithLambda.before.Main.kt"); - } - - @TestMetadata("importInFirstPartInQualifiedExpression.before.Main.kt") - public void testImportInFirstPartInQualifiedExpression() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.Main.kt"); - } - - @TestMetadata("importInFirstPartInUserType.test") - public void testImportInFirstPartInUserType() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importInFirstPartInUserType.test"); - } - - @TestMetadata("importInterface.before.Main.kt") - public void testImportInterface() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importInterface.before.Main.kt"); - } - - @TestMetadata("importKotlinCompanionPropertyAsFieldFromJava.test") - public void testImportKotlinCompanionPropertyAsFieldFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionPropertyAsFieldFromJava.test"); - } - - @TestMetadata("importKotlinCompanionStaticFunctionFromJava.test") - public void testImportKotlinCompanionStaticFunctionFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticFunctionFromJava.test"); - } - - @TestMetadata("importKotlinCompanionStaticPropertyDefaultGetterFromJava.test") - public void testImportKotlinCompanionStaticPropertyDefaultGetterFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultGetterFromJava.test"); - } - - @TestMetadata("importKotlinCompanionStaticPropertyDefaultSetterFromJava.test") - public void testImportKotlinCompanionStaticPropertyDefaultSetterFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultSetterFromJava.test"); - } - - @TestMetadata("importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test") - public void testImportKotlinCompanionStaticPropertyOverloadedGetterFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test"); - } - - @TestMetadata("importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test") - public void testImportKotlinCompanionStaticPropertyOverloadedSetterFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test"); - } - - @TestMetadata("importKotlinPropertyAsFieldFromJava.test") - public void testImportKotlinPropertyAsFieldFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinPropertyAsFieldFromJava.test"); - } - - @TestMetadata("importKotlinStaticFunctionFromJava.test") - public void testImportKotlinStaticFunctionFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticFunctionFromJava.test"); - } - - @TestMetadata("importKotlinStaticPropertyDefaultGetterFromJava.test") - public void testImportKotlinStaticPropertyDefaultGetterFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultGetterFromJava.test"); - } - - @TestMetadata("importKotlinStaticPropertyDefaultSetterFromJava.test") - public void testImportKotlinStaticPropertyDefaultSetterFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultSetterFromJava.test"); - } - - @TestMetadata("importKotlinStaticPropertyOverloadedGetterFromJava.test") - public void testImportKotlinStaticPropertyOverloadedGetterFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedGetterFromJava.test"); - } - - @TestMetadata("importKotlinStaticPropertyOverloadedSetterFromJava.test") - public void testImportKotlinStaticPropertyOverloadedSetterFromJava() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedSetterFromJava.test"); - } - - @TestMetadata("importNullableInterfaceWithGenerics.before.Main.kt") - public void testImportNullableInterfaceWithGenerics() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/importNullableInterfaceWithGenerics.before.Main.kt"); - } - - @TestMetadata("ImportOperatorInvokeWithConvention.before.Main.kt") - public void testImportOperatorInvokeWithConvention() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/ImportOperatorInvokeWithConvention.before.Main.kt"); - } - - @TestMetadata("indexCallExtensionGet.test") - public void testIndexCallExtensionGet() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionGet.test"); - } - - @TestMetadata("indexCallExtensionGetNoOperator.test") - public void testIndexCallExtensionGetNoOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test"); - } - - @TestMetadata("indexCallExtensionImportGetOnNoOperatorWarning.test") - public void testIndexCallExtensionImportGetOnNoOperatorWarning() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test"); - } - - @TestMetadata("indexCallExtensionImportSetOnNoOperatorWarning.test") - public void testIndexCallExtensionImportSetOnNoOperatorWarning() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test"); - } - - @TestMetadata("indexCallExtensionSet.test") - public void testIndexCallExtensionSet() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallExtensionSet.test"); - } - - @TestMetadata("indexCallNoImportWhenGetNeededButSetAvailable.test") - public void testIndexCallNoImportWhenGetNeededButSetAvailable() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test"); - } - - @TestMetadata("indexCallNoImportWhenSetNeededButGetAvailable.test") - public void testIndexCallNoImportWhenSetNeededButGetAvailable() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test"); - } - - @TestMetadata("infixCall.before.Main.kt") - public void testInfixCall() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/infixCall.before.Main.kt"); - } - - @TestMetadata("infixCall2.before.Main.kt") - public void testInfixCall2() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/infixCall2.before.Main.kt"); - } - - @TestMetadata("invokeExtension.test") - public void testInvokeExtension() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/invokeExtension.test"); - } - - @TestMetadata("invokeExtension2.test") - public void testInvokeExtension2() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/invokeExtension2.test"); - } - - @TestMetadata("invokeExtensionNoOperator.test") - public void testInvokeExtensionNoOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/invokeExtensionNoOperator.test"); - } - - @TestMetadata("iteratorOperator.before.Main.kt") - public void testIteratorOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/iteratorOperator.before.Main.kt"); - } - - @TestMetadata("ktij27440.test") - public void testKtij27440() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/ktij27440.test"); - } - - @TestMetadata("memberImportFunction.test") - public void testMemberImportFunction() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportFunction.test"); - } - - @TestMetadata("memberImportJavaField.test") - public void testMemberImportJavaField() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportJavaField.test"); - } - - @TestMetadata("memberImportJavaMethod.test") - public void testMemberImportJavaMethod() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportJavaMethod.test"); - } - - @TestMetadata("memberImportNotForClassFunction.test") - public void testMemberImportNotForClassFunction() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForClassFunction.test"); - } - - @TestMetadata("memberImportNotForClassProperty.test") - public void testMemberImportNotForClassProperty() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForClassProperty.test"); - } - - @TestMetadata("memberImportNotForJavaNonStaticField.test") - public void testMemberImportNotForJavaNonStaticField() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test"); - } - - @TestMetadata("memberImportNotForJavaNonStaticMethod.test") - public void testMemberImportNotForJavaNonStaticMethod() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test"); - } - - @TestMetadata("memberImportNotForTopLevelFunction.test") - public void testMemberImportNotForTopLevelFunction() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test"); - } - - @TestMetadata("memberImportProperty.test") - public void testMemberImportProperty() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberImportProperty.test"); - } - - @TestMetadata("memberWithTopLevelConflict.before.Main.kt") - public void testMemberWithTopLevelConflict() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/memberWithTopLevelConflict.before.Main.kt"); - } - - @TestMetadata("minusOperator.before.Main.kt") - public void testMinusOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/minusOperator.before.Main.kt"); - } - - @TestMetadata("multiDeclarationExtensionAllComponents.test") - public void testMultiDeclarationExtensionAllComponents() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionAllComponents.test"); - } - - @TestMetadata("multiDeclarationExtensionAllComponentsMany.test") - public void testMultiDeclarationExtensionAllComponentsMany() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsMany.test"); - } - - @TestMetadata("multiDeclarationExtensionAllComponentsPrefereFull.test") - public void testMultiDeclarationExtensionAllComponentsPrefereFull() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereFull.test"); - } - - @TestMetadata("multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test") - public void testMultiDeclarationExtensionAllComponentsPrefereNotDeprecated() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test"); - } - - @TestMetadata("multiDeclarationExtensionComponent1.test") - public void testMultiDeclarationExtensionComponent1() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponent1.test"); - } - - @TestMetadata("multiDeclarationExtensionComponent2.test") - public void testMultiDeclarationExtensionComponent2() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponent2.test"); - } - - @TestMetadata("multiDeclarationExtensionComponentNoOperator.test") - public void testMultiDeclarationExtensionComponentNoOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test"); - } - - @TestMetadata("multiFunctionCandidate.test") - public void testMultiFunctionCandidate() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/multiFunctionCandidate.test"); - } - - @TestMetadata("nestedClass.before.Main.kt") - public void testNestedClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/nestedClass.before.Main.kt"); - } - - @TestMetadata("noFunctionImportOnSimpleName.test") - public void testNoFunctionImportOnSimpleName() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test"); - } - - @TestMetadata("noImportForCallableInConstructorCall.test") - public void testNoImportForCallableInConstructorCall() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForCallableInConstructorCall.test"); - } - - @TestMetadata("noImportForCallableInTypeReference.test") - public void testNoImportForCallableInTypeReference() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForCallableInTypeReference.test"); - } - - @TestMetadata("noImportForFunInQualifiedNotFirst.before.Main.kt") - public void testNoImportForFunInQualifiedNotFirst() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt"); - } - - @TestMetadata("noImportForNestedInPrivate.before.Main.kt") - public void testNoImportForNestedInPrivate() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt"); - } - - @TestMetadata("noImportForPrivateClass.before.Main.kt") - public void testNoImportForPrivateClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt"); - } - - @TestMetadata("noImportForPrivateFunction.before.Main.kt") - public void testNoImportForPrivateFunction() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportForPrivateFunction.before.Main.kt"); - } - - @TestMetadata("noImportInImports.before.Main.kt") - public void testNoImportInImports() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportInImports.before.Main.kt"); - } - - @TestMetadata("noImportInQualifiedExpressionNotFirst.before.Main.kt") - public void testNoImportInQualifiedExpressionNotFirst() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt"); - } - - @TestMetadata("noImportInQualifiedUserTypeNotFirst.before.Main.kt") - public void testNoImportInQualifiedUserTypeNotFirst() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportInQualifiedUserTypeNotFirst.before.Main.kt"); - } - - @TestMetadata("noImportInSafeQualifiedExpressionNotFirst.before.Main.kt") - public void testNoImportInSafeQualifiedExpressionNotFirst() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt"); - } - - @TestMetadata("noImportOfExtensionForReferenceWithPackageQualifier.test") - public void testNoImportOfExtensionForReferenceWithPackageQualifier() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportOfExtensionForReferenceWithPackageQualifier.test"); - } - - @TestMetadata("noImportOfExtensionWhenMatchingReceiverIsMissing.test") - public void testNoImportOfExtensionWhenMatchingReceiverIsMissing() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportOfExtensionWhenMatchingReceiverIsMissing.test"); - } - - @TestMetadata("noImportOfNonAnnotationClass.test") - public void testNoImportOfNonAnnotationClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportOfNonAnnotationClass.test"); - } - - @TestMetadata("noImportsForClassInExcludedPackage.before.Main.kt") - public void testNoImportsForClassInExcludedPackage() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportsForClassInExcludedPackage.before.Main.kt"); - } - - @TestMetadata("noImportsForExcludedClass.before.Main.kt") - public void testNoImportsForExcludedClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportsForExcludedClass.before.Main.kt"); - } - - @TestMetadata("noImportsForFunctionInExcludedPackage.before.Main.kt") - public void testNoImportsForFunctionInExcludedPackage() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noImportsForFunctionInExcludedPackage.before.Main.kt"); - } - - @TestMetadata("noMemberFunctionImportOnSimpleName.test") - public void testNoMemberFunctionImportOnSimpleName() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test"); - } - - @TestMetadata("noneApplicableFromInstanceButExtension.before.Main.kt") - public void testNoneApplicableFromInstanceButExtension() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/noneApplicableFromInstanceButExtension.before.Main.kt"); - } - - @TestMetadata("notExcludedClass.before.Main.kt") - public void testNotExcludedClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/notExcludedClass.before.Main.kt"); - } - - @TestMetadata("objectImport.before.Main.kt") - public void testObjectImport() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/objectImport.before.Main.kt"); - } - - @TestMetadata("objectMemberFunctionImportWhenReceiverPresent.before.Main.kt") - public void testObjectMemberFunctionImportWhenReceiverPresent() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/objectMemberFunctionImportWhenReceiverPresent.before.Main.kt"); - } - - @TestMetadata("operatorAssignPlus.test") - public void testOperatorAssignPlus() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/operatorAssignPlus.test"); - } - - @TestMetadata("operatorAssignPlusAssign.test") - public void testOperatorAssignPlusAssign() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/operatorAssignPlusAssign.test"); - } - - @TestMetadata("operatorAssignPlusTwoVariantsDifferentPackages.test") - public void testOperatorAssignPlusTwoVariantsDifferentPackages() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/operatorAssignPlusTwoVariantsDifferentPackages.test"); - } - - @TestMetadata("packageClass.before.Main.kt") - public void testPackageClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/packageClass.before.Main.kt"); - } - - @TestMetadata("plusOperator.before.Main.kt") - public void testPlusOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/plusOperator.before.Main.kt"); - } - - @TestMetadata("plusOperatorWithTypeMismatch.before.Main.kt") - public void testPlusOperatorWithTypeMismatch() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt"); - } - - @TestMetadata("postfixOperator.before.Main.kt") - public void testPostfixOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/postfixOperator.before.Main.kt"); - } - - @TestMetadata("propertyImport.before.Main.kt") - public void testPropertyImport() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/propertyImport.before.Main.kt"); - } - - @TestMetadata("sameModuleImportPriority.before.Main.kt") - public void testSameModuleImportPriority() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/sameModuleImportPriority.before.Main.kt"); - } - - @TestMetadata("sealedClass.test") - public void testSealedClass() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/sealedClass.test"); - } - - @TestMetadata("sealedClass2.test") - public void testSealedClass2() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/sealedClass2.test"); - } - - @TestMetadata("timesAssign.before.Main.kt") - public void testTimesAssign() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/timesAssign.before.Main.kt"); - } - - @TestMetadata("typeAliasConstructorImport.test") - public void testTypeAliasConstructorImport() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasConstructorImport.test"); - } - - @TestMetadata("typeAliasExtensionFunction.before.Main.kt") - public void testTypeAliasExtensionFunction() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasExtensionFunction.before.Main.kt"); - } - - @TestMetadata("typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt") - public void testTypeAliasExtensionFunctionInTypeAliasChain() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt"); - } - - @TestMetadata("typeAliasExtensionProperty.before.Main.kt") - public void testTypeAliasExtensionProperty() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasExtensionProperty.before.Main.kt"); - } - - @TestMetadata("typeAliasImport.before.Main.kt") - public void testTypeAliasImport() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/typeAliasImport.before.Main.kt"); - } - - @TestMetadata("unaryMinusOperator.before.Main.kt") - public void testUnaryMinusOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/unaryMinusOperator.before.Main.kt"); - } - - @TestMetadata("unaryPlusOperator.before.Main.kt") - public void testUnaryPlusOperator() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/unaryPlusOperator.before.Main.kt"); - } - - @TestMetadata("unresolvedImplicitReceiver.test") - public void testUnresolvedImplicitReceiver() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/unresolvedImplicitReceiver.test"); - } - - @TestMetadata("withSmartCastQualifier.before.Main.kt") - public void testWithSmartCastQualifier() throws Exception { - runTest("../../../idea/tests/testData/quickfix/autoImports/withSmartCastQualifier.before.Main.kt"); + @TestMetadata("javaReceiverNullabilityInvoke.test") + public void testJavaReceiverNullabilityInvoke() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/javaReceiverNullabilityInvoke.test"); } } } diff --git a/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java b/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java index 2fd2ba4f4fe4..38238893b969 100644 --- a/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java +++ b/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java @@ -5653,7 +5653,133 @@ public abstract class HighLevelQuickFixTestGenerated extends AbstractHighLevelQu + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/surroundWithNullCheck") + public static class SurroundWithNullCheck extends AbstractHighLevelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + @TestMetadata("argumentNullable.kt") + public void testArgumentNullable() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/argumentNullable.kt"); + } + + @TestMetadata("assignment.kt") + public void testAssignment() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/assignment.kt"); + } + + @TestMetadata("chainedUnsafeCall.kt") + public void testChainedUnsafeCall() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/chainedUnsafeCall.kt"); + } + + @TestMetadata("expressionUnsafeCall.kt") + public void testExpressionUnsafeCall() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt"); + } + + @TestMetadata("in.kt") + public void testIn() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/in.kt"); + } + + @TestMetadata("inLambda.kt") + public void testInLambda() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/inLambda.kt"); + } + + @TestMetadata("inLambda2.kt") + public void testInLambda2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/inLambda2.kt"); + } + + @TestMetadata("inLambda3.kt") + public void testInLambda3() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/inLambda3.kt"); + } + + @TestMetadata("infixUnsafeCall.kt") + public void testInfixUnsafeCall() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt"); + } + + @TestMetadata("invokeFuncUnsafe.kt") + public void testInvokeFuncUnsafe() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt"); + } + + @TestMetadata("invokeUnsafe.kt") + public void testInvokeUnsafe() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt"); + } + + @TestMetadata("iteratorUnsafe.kt") + public void testIteratorUnsafe() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt"); + } + + @TestMetadata("nullableInCondition.kt") + public void testNullableInCondition() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt"); + } + + @TestMetadata("objectNestedQualifiers.kt") + public void testObjectNestedQualifiers() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt"); + } + + @TestMetadata("objectQualifier.kt") + public void testObjectQualifier() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/objectQualifier.kt"); + } + + @TestMetadata("simpleUnsafeCall.kt") + public void testSimpleUnsafeCall() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt"); + } + + @TestMetadata("unsafeCallInBinary.kt") + public void testUnsafeCallInBinary() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt"); + } + + @TestMetadata("unsafeCallInDeclaration.kt") + public void testUnsafeCallInDeclaration() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt"); + } + + @TestMetadata("unsafeCallInGetter.kt") + public void testUnsafeCallInGetter() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInGetter.kt"); + } + + @TestMetadata("unsafeCallInsideAnonymous.kt") + public void testUnsafeCallInsideAnonymous() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt"); + } + + @TestMetadata("unsafeCallInsideIf.kt") + public void testUnsafeCallInsideIf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt"); + } + + @TestMetadata("unsafeCallInsideWhen.kt") + public void testUnsafeCallInsideWhen() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt"); + } + + @TestMetadata("unsafeCallInsideWhile.kt") + public void testUnsafeCallInsideWhile() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt"); + } + + @TestMetadata("unstableValue.kt") + public void testUnstableValue() throws Exception { + runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/unstableValue.kt"); + } + } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/argumentNullable.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/argumentNullable.kt index 12660b776cc4..284fb80cde1d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/argumentNullable.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/argumentNullable.kt @@ -5,4 +5,5 @@ fun foo(x: String?) { } fun bar(s: String) = s.hashCode() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/argumentNullable.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/argumentNullable.kt.after index 9eee5f6f7cce..07a79ed604d7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/argumentNullable.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/argumentNullable.kt.after @@ -7,4 +7,5 @@ fun foo(x: String?) { } fun bar(s: String) = s.hashCode() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/assignment.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/assignment.kt index 4c841af9f7cc..e709ced8e525 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/assignment.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/assignment.kt @@ -4,4 +4,5 @@ fun foo(s: String?) { var ss: String = "" ss = s } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/assignment.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/assignment.kt.after index 87e1aa31b169..638064f4fc27 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/assignment.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/assignment.kt.after @@ -6,4 +6,5 @@ fun foo(s: String?) { ss = s } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/in.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/in.kt index ea775c35771f..db5eb7ef9380 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/in.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/in.kt @@ -2,4 +2,5 @@ fun test(a: String, b: List?) { a in b } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/in.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/in.kt.after index 255e2cc43607..e6b393ab6009 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/in.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/in.kt.after @@ -4,4 +4,5 @@ fun test(a: String, b: List?) { a in b } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda.kt index a13e2abb1f76..a79522bfbbee 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda.kt @@ -11,4 +11,5 @@ fun test() { it.foo() } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda.kt.after index 5ac5d5018a8e..0eae1550cf38 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda.kt.after @@ -13,4 +13,5 @@ fun test() { } } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda3.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda3.kt index e4236ee0ccb7..b0000310aeb9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda3.kt @@ -11,4 +11,5 @@ fun test(x: Foo?) { x.foo() } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda3.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda3.kt.after index 15fbb0ecaf87..34446f6c7bd6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda3.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda3.kt.after @@ -13,4 +13,5 @@ fun test(x: Foo?) { } } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt index 3a9fb98b8f90..f527c62bae35 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt @@ -5,4 +5,5 @@ infix fun Int.op(arg: Int) = this fun foo(arg: Int?) { arg op 42 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt.after index 9c2786ef4645..c0e3cca3b9ff 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt.after @@ -7,4 +7,5 @@ fun foo(arg: Int?) { arg op 42 } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt index 47e7dec74bff..e2c65aa7552c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt @@ -3,4 +3,5 @@ fun foo(exec: (() -> Unit)?) { exec() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt.after index 181d639040a0..2f4e1ba62cc4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt.after @@ -5,4 +5,5 @@ fun foo(exec: (() -> Unit)?) { exec() } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt index 90fe60904c63..67f27f2c5a1d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt @@ -5,4 +5,5 @@ operator fun Int.invoke() = this fun foo(arg: Int?) { arg() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt.after index c2a00d4ee36f..20db6fb194ca 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt.after @@ -7,4 +7,5 @@ fun foo(arg: Int?) { arg() } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt index 961897ce8fac..918c90cb1b94 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt @@ -4,4 +4,5 @@ fun foo(list: List?) { for (element in list) {} } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt.after index 53d7613f02c0..01f5e10142ec 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt.after @@ -6,4 +6,5 @@ fun foo(list: List?) { for (element in list) {} } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt index 8541205987c8..8b84d4e27d93 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt @@ -6,4 +6,5 @@ fun foz(arg: String?) { } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt.after index 5d3c9f86d964..39e7ff3d4c90 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt.after @@ -8,4 +8,5 @@ fun foz(arg: String?) { } } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt index 8bfc25dd73c3..444ad691f107 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt @@ -8,4 +8,5 @@ object Util { fun f1(o: Any, p: Int): Any = o fun f2(o: Any): Any = o } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt.after index fa3dffe14649..62ee605c2c63 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt.after @@ -10,4 +10,5 @@ object Util { fun f1(o: Any, p: Int): Any = o fun f2(o: Any): Any = o } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectQualifier.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectQualifier.kt index f31c93e69a2b..48a188147c26 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectQualifier.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectQualifier.kt @@ -8,4 +8,5 @@ fun use(arg: Int?) { Obj.foo(arg) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectQualifier.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectQualifier.kt.after index b50be19d4d7b..376fd7e0eabe 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectQualifier.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/objectQualifier.kt.after @@ -10,4 +10,5 @@ fun use(arg: Int?) { } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt index 4859685ffbbc..1098b8c17077 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt @@ -3,4 +3,5 @@ fun foo(arg: Int?) { arg.inc() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt.after index 21ad79ce845c..928a74c9d23c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt.after @@ -5,4 +5,5 @@ fun foo(arg: Int?) { arg.inc() } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt index 0ce339c3b8c4..2171ac571677 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt @@ -3,4 +3,5 @@ fun foo(arg: Int?) { 42 + arg.inc() - 13 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt.after index 7ffbc1c50e45..3a4aa213bfe4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt.after @@ -5,4 +5,5 @@ fun foo(arg: Int?) { 42 + arg.inc() - 13 } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt index 8e387afa6294..f7fc5a3265cd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt @@ -6,4 +6,5 @@ fun Int.bar() = this fun foo(arg: Int?) { run(fun() = arg.bar()) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt.after index fff0cef757b6..af58385bff0a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt.after @@ -8,4 +8,5 @@ fun foo(arg: Int?) { run(fun() = arg.bar()) } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt index 9fef211ca536..94aac2d1fbd6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt @@ -3,4 +3,5 @@ fun foo(arg: Int?, flag: Boolean) { if (flag) arg.inc() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt.after index 5617c8d2fe7a..125b88ec9bcf 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt.after @@ -5,4 +5,5 @@ fun foo(arg: Int?, flag: Boolean) { arg.inc() } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt index 16626f3e10c3..bc1abf8e463f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt @@ -6,4 +6,5 @@ fun foo(arg: Int?, flag: Boolean) { true -> arg.inc() } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt.after index a3bde14b620c..ec22db6d9cb4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt.after @@ -8,4 +8,5 @@ fun foo(arg: Int?, flag: Boolean) { } } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt index be46d3b2485a..ad9e727d1c69 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt @@ -3,4 +3,5 @@ fun foo(arg: Int?, flag: Boolean) { while (flag) arg.inc() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt.after index f9d07abf9e9f..5103dc168f92 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt.after @@ -5,4 +5,5 @@ fun foo(arg: Int?, flag: Boolean) { arg.inc() } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.SurroundWithNullCheckFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.SurroundWithNullCheckFixFactory$SurroundWithNullCheckFix \ No newline at end of file diff --git a/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt b/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt index cd335cd70919..f93db8b2613d 100644 --- a/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt +++ b/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt @@ -188,7 +188,7 @@ internal fun MutableTWorkspace.generateK2FixTests() { model("$idea/quickfix/specifyTypeExplicitly", pattern = pattern, isIgnored = true) model("$idea/quickfix/superTypeIsExtensionType", pattern = pattern, isIgnored = true) model("$idea/quickfix/suppress", pattern = pattern, isIgnored = true) - model("$idea/quickfix/surroundWithNullCheck", pattern = pattern, isIgnored = true) + model("$idea/quickfix/surroundWithNullCheck", pattern = pattern) model("$idea/quickfix/suspiciousCollectionReassignment", pattern = pattern, isIgnored = true) model("$idea/quickfix/tooLongCharLiteralToString", pattern = pattern, isIgnored = true) model("$idea/quickfix/typeImports", pattern = pattern, isIgnored = true) @@ -209,10 +209,17 @@ internal fun MutableTWorkspace.generateK2FixTests() { } testClass { + val pattern = Patterns.forRegex("""^(\w+)\.((before\.Main\.\w+)|(test))$""") + val testMethodName = "doTestWithExtraFile" model( "$idea/quickfix/autoImports", - pattern = Patterns.forRegex("""^(\w+)\.((before\.Main\.\w+)|(test))$"""), - testMethodName = "doTestWithExtraFile" + pattern = pattern, + testMethodName = testMethodName, + ) + model( + "$idea/quickfix/surroundWithNullCheck", + pattern = pattern, + testMethodName = testMethodName, ) }