From 71a8d9c0bb6cfd16a1a9ef75be49fb365c2e22e8 Mon Sep 17 00:00:00 2001 From: Mark Punzalan Date: Fri, 23 Apr 2021 18:05:54 +0000 Subject: [PATCH] FIR quickfix: Enable addExclExclCall tests for FIR, move typeMismatch tests for addExclExclCall to addExclExclCall directory. --- .../HighLevelQuickFixTestGenerated.java | 423 ++++++++++++------ .../typeMismatch/assignmentRValue.kt} | 0 .../typeMismatch/assignmentRValue.kt.after} | 0 .../typeMismatch/memberAccessInExtension.kt} | 0 .../memberAccessInExtension.kt.after} | 0 ...berAccessInExtensionAsAssignmentRValue.kt} | 0 ...essInExtensionAsAssignmentRValue.kt.after} | 0 .../typeMismatch/qualifiedArgument.kt} | 0 .../typeMismatch/qualifiedArgument.kt.after} | 0 .../typeMismatch/removeNullability.kt} | 0 .../typeMismatch/removeNullability.kt.after} | 0 ...oveNullabilityDisabledWhenItCannotHelp.kt} | 0 .../removeNullabilityForGeneric.kt} | 0 .../removeNullabilityForGeneric.kt.after} | 0 .../removeNullabilityForSubclass.kt} | 0 .../removeNullabilityForSubclass.kt.after} | 0 .../typeMismatch/whenSmartCastImpossible.kt} | 0 .../whenSmartCastImpossible.kt.after} | 0 .../QuickFixMultiFileTestGenerated.java | 13 + .../idea/quickfix/QuickFixTestGenerated.java | 103 +++-- 20 files changed, 363 insertions(+), 176 deletions(-) rename idea/testData/quickfix/{typeMismatch/addExclExclToAssignmentRValue.kt => addExclExclCall/typeMismatch/assignmentRValue.kt} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToAssignmentRValue.kt.after => addExclExclCall/typeMismatch/assignmentRValue.kt.after} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToMemberAccessInExtension.kt => addExclExclCall/typeMismatch/memberAccessInExtension.kt} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToMemberAccessInExtension.kt.after => addExclExclCall/typeMismatch/memberAccessInExtension.kt.after} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToMemberAccessInExtensionAsAssignmentRValue.kt => addExclExclCall/typeMismatch/memberAccessInExtensionAsAssignmentRValue.kt} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToMemberAccessInExtensionAsAssignmentRValue.kt.after => addExclExclCall/typeMismatch/memberAccessInExtensionAsAssignmentRValue.kt.after} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToQualifiedArgument.kt => addExclExclCall/typeMismatch/qualifiedArgument.kt} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToQualifiedArgument.kt.after => addExclExclCall/typeMismatch/qualifiedArgument.kt.after} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToRemoveNullability.kt => addExclExclCall/typeMismatch/removeNullability.kt} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToRemoveNullability.kt.after => addExclExclCall/typeMismatch/removeNullability.kt.after} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToRemoveNullabilityDisabledWhenItCannotHelp.kt => addExclExclCall/typeMismatch/removeNullabilityDisabledWhenItCannotHelp.kt} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToRemoveNullabilityForGeneric.kt => addExclExclCall/typeMismatch/removeNullabilityForGeneric.kt} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToRemoveNullabilityForGeneric.kt.after => addExclExclCall/typeMismatch/removeNullabilityForGeneric.kt.after} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToRemoveNullabilityForSubclass.kt => addExclExclCall/typeMismatch/removeNullabilityForSubclass.kt} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclToRemoveNullabilityForSubclass.kt.after => addExclExclCall/typeMismatch/removeNullabilityForSubclass.kt.after} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclWhenSmartCastImpossible.kt => addExclExclCall/typeMismatch/whenSmartCastImpossible.kt} (100%) rename idea/testData/quickfix/{typeMismatch/addExclExclWhenSmartCastImpossible.kt.after => addExclExclCall/typeMismatch/whenSmartCastImpossible.kt.after} (100%) diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java index c23d5c11498..37ebd4bd18e 100644 --- a/idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/quickfix/HighLevelQuickFixTestGenerated.java @@ -197,6 +197,298 @@ public class HighLevelQuickFixTestGenerated extends AbstractHighLevelQuickFixTes } } + @TestMetadata("idea/testData/quickfix/addExclExclCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddExclExclCall extends AbstractHighLevelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInAddExclExclCall() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/quickfix/addExclExclCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), null, true); + } + + @TestMetadata("array.kt") + public void testArray() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/array.kt"); + } + + @TestMetadata("array2.kt") + public void testArray2() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/array2.kt"); + } + + @TestMetadata("array3.kt") + public void testArray3() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/array3.kt"); + } + + @TestMetadata("array4.kt") + public void testArray4() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/array4.kt"); + } + + @TestMetadata("functionReference.kt") + public void testFunctionReference() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/functionReference.kt"); + } + + @TestMetadata("functionReference2.kt") + public void testFunctionReference2() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/functionReference2.kt"); + } + + @TestMetadata("functionReference3.kt") + public void testFunctionReference3() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/functionReference3.kt"); + } + + @TestMetadata("implicit.kt") + public void testImplicit() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/implicit.kt"); + } + + @TestMetadata("implicit2.kt") + public void testImplicit2() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/implicit2.kt"); + } + + @TestMetadata("implicit3.kt") + public void testImplicit3() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/implicit3.kt"); + } + + @TestMetadata("implicitFunctionCall.kt") + public void testImplicitFunctionCall() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/implicitFunctionCall.kt"); + } + + @TestMetadata("iterable.kt") + public void testIterable() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/iterable.kt"); + } + + @TestMetadata("iterableInExtension.kt") + public void testIterableInExtension() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/iterableInExtension.kt"); + } + + @TestMetadata("normal.kt") + public void testNormal() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/normal.kt"); + } + + @TestMetadata("normal2.kt") + public void testNormal2() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/normal2.kt"); + } + + @TestMetadata("null.kt") + public void testNull() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/null.kt"); + } + + @TestMetadata("nullExpression.kt") + public void testNullExpression() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/nullExpression.kt"); + } + + @TestMetadata("operationIn.kt") + public void testOperationIn() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/operationIn.kt"); + } + + @TestMetadata("idea/testData/quickfix/addExclExclCall/typeMismatch") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeMismatch extends AbstractHighLevelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInTypeMismatch() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/quickfix/addExclExclCall/typeMismatch"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), null, true); + } + + @TestMetadata("assignmentRValue.kt") + public void testAssignmentRValue() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/assignmentRValue.kt"); + } + + @TestMetadata("memberAccessInExtension.kt") + public void testMemberAccessInExtension() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtension.kt"); + } + + @TestMetadata("memberAccessInExtensionAsAssignmentRValue.kt") + public void testMemberAccessInExtensionAsAssignmentRValue() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtensionAsAssignmentRValue.kt"); + } + + @TestMetadata("qualifiedArgument.kt") + public void testQualifiedArgument() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/qualifiedArgument.kt"); + } + + @TestMetadata("removeNullability.kt") + public void testRemoveNullability() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullability.kt"); + } + + @TestMetadata("removeNullabilityDisabledWhenItCannotHelp.kt") + public void testRemoveNullabilityDisabledWhenItCannotHelp() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityDisabledWhenItCannotHelp.kt"); + } + + @TestMetadata("removeNullabilityForGeneric.kt") + public void testRemoveNullabilityForGeneric() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForGeneric.kt"); + } + + @TestMetadata("removeNullabilityForSubclass.kt") + public void testRemoveNullabilityForSubclass() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForSubclass.kt"); + } + + @TestMetadata("whenSmartCastImpossible.kt") + public void testWhenSmartCastImpossible() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/whenSmartCastImpossible.kt"); + } + } + } + + @TestMetadata("idea/testData/quickfix/addInitializer") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddInitializer extends AbstractHighLevelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInAddInitializer() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/quickfix/addInitializer"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), null, true); + } + + @TestMetadata("localVar.kt") + public void testLocalVar() throws Exception { + runTest("idea/testData/quickfix/addInitializer/localVar.kt"); + } + + @TestMetadata("memberExtensionProperty.kt") + public void testMemberExtensionProperty() throws Exception { + runTest("idea/testData/quickfix/addInitializer/memberExtensionProperty.kt"); + } + + @TestMetadata("memberExtensionPropertyVarGetterOnly.kt") + public void testMemberExtensionPropertyVarGetterOnly() throws Exception { + runTest("idea/testData/quickfix/addInitializer/memberExtensionPropertyVarGetterOnly.kt"); + } + + @TestMetadata("memberExtensionPropertyVarSetterOnly.kt") + public void testMemberExtensionPropertyVarSetterOnly() throws Exception { + runTest("idea/testData/quickfix/addInitializer/memberExtensionPropertyVarSetterOnly.kt"); + } + + @TestMetadata("memberProperty.kt") + public void testMemberProperty() throws Exception { + runTest("idea/testData/quickfix/addInitializer/memberProperty.kt"); + } + + @TestMetadata("memberPropertyVarGetterOnly.kt") + public void testMemberPropertyVarGetterOnly() throws Exception { + runTest("idea/testData/quickfix/addInitializer/memberPropertyVarGetterOnly.kt"); + } + + @TestMetadata("memberPropertyVarSetterOnly.kt") + public void testMemberPropertyVarSetterOnly() throws Exception { + runTest("idea/testData/quickfix/addInitializer/memberPropertyVarSetterOnly.kt"); + } + + @TestMetadata("memberPropertyWithAccessor.kt") + public void testMemberPropertyWithAccessor() throws Exception { + runTest("idea/testData/quickfix/addInitializer/memberPropertyWithAccessor.kt"); + } + + @TestMetadata("memberPropertyWithDelegateRuntime.kt") + public void testMemberPropertyWithDelegateRuntime() throws Exception { + runTest("idea/testData/quickfix/addInitializer/memberPropertyWithDelegateRuntime.kt"); + } + + @TestMetadata("topLevelExtensionProperty.kt") + public void testTopLevelExtensionProperty() throws Exception { + runTest("idea/testData/quickfix/addInitializer/topLevelExtensionProperty.kt"); + } + + @TestMetadata("topLevelExtensionPropertySetterOnly.kt") + public void testTopLevelExtensionPropertySetterOnly() throws Exception { + runTest("idea/testData/quickfix/addInitializer/topLevelExtensionPropertySetterOnly.kt"); + } + + @TestMetadata("topLevelProperty.kt") + public void testTopLevelProperty() throws Exception { + runTest("idea/testData/quickfix/addInitializer/topLevelProperty.kt"); + } + + @TestMetadata("topLevelPropertyVarClass.kt") + public void testTopLevelPropertyVarClass() throws Exception { + runTest("idea/testData/quickfix/addInitializer/topLevelPropertyVarClass.kt"); + } + + @TestMetadata("topLevelPropertyVarGetterOnly.kt") + public void testTopLevelPropertyVarGetterOnly() throws Exception { + runTest("idea/testData/quickfix/addInitializer/topLevelPropertyVarGetterOnly.kt"); + } + + @TestMetadata("topLevelPropertyVarSetterOnly.kt") + public void testTopLevelPropertyVarSetterOnly() throws Exception { + runTest("idea/testData/quickfix/addInitializer/topLevelPropertyVarSetterOnly.kt"); + } + + @TestMetadata("topLevelPropertyWithDelegateRuntime.kt") + public void testTopLevelPropertyWithDelegateRuntime() throws Exception { + runTest("idea/testData/quickfix/addInitializer/topLevelPropertyWithDelegateRuntime.kt"); + } + + @TestMetadata("topLevelPropertyWithGetter.kt") + public void testTopLevelPropertyWithGetter() throws Exception { + runTest("idea/testData/quickfix/addInitializer/topLevelPropertyWithGetter.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/addPropertyAccessors") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddPropertyAccessors extends AbstractHighLevelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInAddPropertyAccessors() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/quickfix/addPropertyAccessors"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), null, true); + } + + @TestMetadata("val.kt") + public void testVal() throws Exception { + runTest("idea/testData/quickfix/addPropertyAccessors/val.kt"); + } + + @TestMetadata("var.kt") + public void testVar() throws Exception { + runTest("idea/testData/quickfix/addPropertyAccessors/var.kt"); + } + + @TestMetadata("varHasGetter.kt") + public void testVarHasGetter() throws Exception { + runTest("idea/testData/quickfix/addPropertyAccessors/varHasGetter.kt"); + } + + @TestMetadata("varHasSetter.kt") + public void testVarHasSetter() throws Exception { + runTest("idea/testData/quickfix/addPropertyAccessors/varHasSetter.kt"); + } + } + @TestMetadata("idea/testData/quickfix/expressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1181,137 +1473,6 @@ public class HighLevelQuickFixTestGenerated extends AbstractHighLevelQuickFixTes } } - @TestMetadata("idea/testData/quickfix/addInitializer") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AddInitializer extends AbstractHighLevelQuickFixTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInAddInitializer() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/quickfix/addInitializer"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), null, true); - } - - @TestMetadata("localVar.kt") - public void testLocalVar() throws Exception { - runTest("idea/testData/quickfix/addInitializer/localVar.kt"); - } - - @TestMetadata("memberExtensionProperty.kt") - public void testMemberExtensionProperty() throws Exception { - runTest("idea/testData/quickfix/addInitializer/memberExtensionProperty.kt"); - } - - @TestMetadata("memberExtensionPropertyVarGetterOnly.kt") - public void testMemberExtensionPropertyVarGetterOnly() throws Exception { - runTest("idea/testData/quickfix/addInitializer/memberExtensionPropertyVarGetterOnly.kt"); - } - - @TestMetadata("memberExtensionPropertyVarSetterOnly.kt") - public void testMemberExtensionPropertyVarSetterOnly() throws Exception { - runTest("idea/testData/quickfix/addInitializer/memberExtensionPropertyVarSetterOnly.kt"); - } - - @TestMetadata("memberProperty.kt") - public void testMemberProperty() throws Exception { - runTest("idea/testData/quickfix/addInitializer/memberProperty.kt"); - } - - @TestMetadata("memberPropertyVarGetterOnly.kt") - public void testMemberPropertyVarGetterOnly() throws Exception { - runTest("idea/testData/quickfix/addInitializer/memberPropertyVarGetterOnly.kt"); - } - - @TestMetadata("memberPropertyVarSetterOnly.kt") - public void testMemberPropertyVarSetterOnly() throws Exception { - runTest("idea/testData/quickfix/addInitializer/memberPropertyVarSetterOnly.kt"); - } - - @TestMetadata("memberPropertyWithAccessor.kt") - public void testMemberPropertyWithAccessor() throws Exception { - runTest("idea/testData/quickfix/addInitializer/memberPropertyWithAccessor.kt"); - } - - @TestMetadata("memberPropertyWithDelegateRuntime.kt") - public void testMemberPropertyWithDelegateRuntime() throws Exception { - runTest("idea/testData/quickfix/addInitializer/memberPropertyWithDelegateRuntime.kt"); - } - - @TestMetadata("topLevelExtensionProperty.kt") - public void testTopLevelExtensionProperty() throws Exception { - runTest("idea/testData/quickfix/addInitializer/topLevelExtensionProperty.kt"); - } - - @TestMetadata("topLevelExtensionPropertySetterOnly.kt") - public void testTopLevelExtensionPropertySetterOnly() throws Exception { - runTest("idea/testData/quickfix/addInitializer/topLevelExtensionPropertySetterOnly.kt"); - } - - @TestMetadata("topLevelProperty.kt") - public void testTopLevelProperty() throws Exception { - runTest("idea/testData/quickfix/addInitializer/topLevelProperty.kt"); - } - - @TestMetadata("topLevelPropertyVarClass.kt") - public void testTopLevelPropertyVarClass() throws Exception { - runTest("idea/testData/quickfix/addInitializer/topLevelPropertyVarClass.kt"); - } - - @TestMetadata("topLevelPropertyVarGetterOnly.kt") - public void testTopLevelPropertyVarGetterOnly() throws Exception { - runTest("idea/testData/quickfix/addInitializer/topLevelPropertyVarGetterOnly.kt"); - } - - @TestMetadata("topLevelPropertyVarSetterOnly.kt") - public void testTopLevelPropertyVarSetterOnly() throws Exception { - runTest("idea/testData/quickfix/addInitializer/topLevelPropertyVarSetterOnly.kt"); - } - - @TestMetadata("topLevelPropertyWithDelegateRuntime.kt") - public void testTopLevelPropertyWithDelegateRuntime() throws Exception { - runTest("idea/testData/quickfix/addInitializer/topLevelPropertyWithDelegateRuntime.kt"); - } - - @TestMetadata("topLevelPropertyWithGetter.kt") - public void testTopLevelPropertyWithGetter() throws Exception { - runTest("idea/testData/quickfix/addInitializer/topLevelPropertyWithGetter.kt"); - } - } - - @TestMetadata("idea/testData/quickfix/addPropertyAccessors") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AddPropertyAccessors extends AbstractHighLevelQuickFixTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInAddPropertyAccessors() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/quickfix/addPropertyAccessors"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), null, true); - } - - @TestMetadata("val.kt") - public void testVal() throws Exception { - runTest("idea/testData/quickfix/addPropertyAccessors/val.kt"); - } - - @TestMetadata("var.kt") - public void testVar() throws Exception { - runTest("idea/testData/quickfix/addPropertyAccessors/var.kt"); - } - - @TestMetadata("varHasGetter.kt") - public void testVarHasGetter() throws Exception { - runTest("idea/testData/quickfix/addPropertyAccessors/varHasGetter.kt"); - } - - @TestMetadata("varHasSetter.kt") - public void testVarHasSetter() throws Exception { - runTest("idea/testData/quickfix/addPropertyAccessors/varHasSetter.kt"); - } - } - @TestMetadata("idea/testData/quickfix/when") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToAssignmentRValue.kt b/idea/testData/quickfix/addExclExclCall/typeMismatch/assignmentRValue.kt similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToAssignmentRValue.kt rename to idea/testData/quickfix/addExclExclCall/typeMismatch/assignmentRValue.kt diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToAssignmentRValue.kt.after b/idea/testData/quickfix/addExclExclCall/typeMismatch/assignmentRValue.kt.after similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToAssignmentRValue.kt.after rename to idea/testData/quickfix/addExclExclCall/typeMismatch/assignmentRValue.kt.after diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtension.kt b/idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtension.kt similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtension.kt rename to idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtension.kt diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtension.kt.after b/idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtension.kt.after similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtension.kt.after rename to idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtension.kt.after diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtensionAsAssignmentRValue.kt b/idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtensionAsAssignmentRValue.kt similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtensionAsAssignmentRValue.kt rename to idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtensionAsAssignmentRValue.kt diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtensionAsAssignmentRValue.kt.after b/idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtensionAsAssignmentRValue.kt.after similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtensionAsAssignmentRValue.kt.after rename to idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtensionAsAssignmentRValue.kt.after diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToQualifiedArgument.kt b/idea/testData/quickfix/addExclExclCall/typeMismatch/qualifiedArgument.kt similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToQualifiedArgument.kt rename to idea/testData/quickfix/addExclExclCall/typeMismatch/qualifiedArgument.kt diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToQualifiedArgument.kt.after b/idea/testData/quickfix/addExclExclCall/typeMismatch/qualifiedArgument.kt.after similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToQualifiedArgument.kt.after rename to idea/testData/quickfix/addExclExclCall/typeMismatch/qualifiedArgument.kt.after diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullability.kt b/idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullability.kt similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullability.kt rename to idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullability.kt diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullability.kt.after b/idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullability.kt.after similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullability.kt.after rename to idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullability.kt.after diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityDisabledWhenItCannotHelp.kt b/idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityDisabledWhenItCannotHelp.kt similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityDisabledWhenItCannotHelp.kt rename to idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityDisabledWhenItCannotHelp.kt diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForGeneric.kt b/idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForGeneric.kt similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForGeneric.kt rename to idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForGeneric.kt diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForGeneric.kt.after b/idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForGeneric.kt.after similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForGeneric.kt.after rename to idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForGeneric.kt.after diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForSubclass.kt b/idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForSubclass.kt similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForSubclass.kt rename to idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForSubclass.kt diff --git a/idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForSubclass.kt.after b/idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForSubclass.kt.after similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForSubclass.kt.after rename to idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForSubclass.kt.after diff --git a/idea/testData/quickfix/typeMismatch/addExclExclWhenSmartCastImpossible.kt b/idea/testData/quickfix/addExclExclCall/typeMismatch/whenSmartCastImpossible.kt similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclWhenSmartCastImpossible.kt rename to idea/testData/quickfix/addExclExclCall/typeMismatch/whenSmartCastImpossible.kt diff --git a/idea/testData/quickfix/typeMismatch/addExclExclWhenSmartCastImpossible.kt.after b/idea/testData/quickfix/addExclExclCall/typeMismatch/whenSmartCastImpossible.kt.after similarity index 100% rename from idea/testData/quickfix/typeMismatch/addExclExclWhenSmartCastImpossible.kt.after rename to idea/testData/quickfix/addExclExclCall/typeMismatch/whenSmartCastImpossible.kt.after diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java index d8c28bacb81..9b98ddf36f2 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java @@ -136,6 +136,19 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes public void testAllFilesPresentInAddExclExclCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/quickfix/addExclExclCall"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), null, true); } + + @TestMetadata("idea/testData/quickfix/addExclExclCall/typeMismatch") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeMismatch extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath); + } + + public void testAllFilesPresentInTypeMismatch() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/quickfix/addExclExclCall/typeMismatch"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), null, true); + } + } } @TestMetadata("idea/testData/quickfix/addGenericUpperBound") diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java index 364db05d7e3..c777a06f2c5 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java @@ -711,6 +711,64 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { public void testOperationIn() throws Exception { runTest("idea/testData/quickfix/addExclExclCall/operationIn.kt"); } + + @TestMetadata("idea/testData/quickfix/addExclExclCall/typeMismatch") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeMismatch extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInTypeMismatch() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/quickfix/addExclExclCall/typeMismatch"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), null, true); + } + + @TestMetadata("assignmentRValue.kt") + public void testAssignmentRValue() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/assignmentRValue.kt"); + } + + @TestMetadata("memberAccessInExtension.kt") + public void testMemberAccessInExtension() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtension.kt"); + } + + @TestMetadata("memberAccessInExtensionAsAssignmentRValue.kt") + public void testMemberAccessInExtensionAsAssignmentRValue() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/memberAccessInExtensionAsAssignmentRValue.kt"); + } + + @TestMetadata("qualifiedArgument.kt") + public void testQualifiedArgument() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/qualifiedArgument.kt"); + } + + @TestMetadata("removeNullability.kt") + public void testRemoveNullability() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullability.kt"); + } + + @TestMetadata("removeNullabilityDisabledWhenItCannotHelp.kt") + public void testRemoveNullabilityDisabledWhenItCannotHelp() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityDisabledWhenItCannotHelp.kt"); + } + + @TestMetadata("removeNullabilityForGeneric.kt") + public void testRemoveNullabilityForGeneric() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForGeneric.kt"); + } + + @TestMetadata("removeNullabilityForSubclass.kt") + public void testRemoveNullabilityForSubclass() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/removeNullabilityForSubclass.kt"); + } + + @TestMetadata("whenSmartCastImpossible.kt") + public void testWhenSmartCastImpossible() throws Exception { + runTest("idea/testData/quickfix/addExclExclCall/typeMismatch/whenSmartCastImpossible.kt"); + } + } } @TestMetadata("idea/testData/quickfix/addGenericUpperBound") @@ -13786,51 +13844,6 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { runTest("idea/testData/quickfix/typeMismatch/addArrayOfTypeForNamedParameter.kt"); } - @TestMetadata("addExclExclToAssignmentRValue.kt") - public void testAddExclExclToAssignmentRValue() throws Exception { - runTest("idea/testData/quickfix/typeMismatch/addExclExclToAssignmentRValue.kt"); - } - - @TestMetadata("addExclExclToMemberAccessInExtension.kt") - public void testAddExclExclToMemberAccessInExtension() throws Exception { - runTest("idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtension.kt"); - } - - @TestMetadata("addExclExclToMemberAccessInExtensionAsAssignmentRValue.kt") - public void testAddExclExclToMemberAccessInExtensionAsAssignmentRValue() throws Exception { - runTest("idea/testData/quickfix/typeMismatch/addExclExclToMemberAccessInExtensionAsAssignmentRValue.kt"); - } - - @TestMetadata("addExclExclToQualifiedArgument.kt") - public void testAddExclExclToQualifiedArgument() throws Exception { - runTest("idea/testData/quickfix/typeMismatch/addExclExclToQualifiedArgument.kt"); - } - - @TestMetadata("addExclExclToRemoveNullability.kt") - public void testAddExclExclToRemoveNullability() throws Exception { - runTest("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullability.kt"); - } - - @TestMetadata("addExclExclToRemoveNullabilityDisabledWhenItCannotHelp.kt") - public void testAddExclExclToRemoveNullabilityDisabledWhenItCannotHelp() throws Exception { - runTest("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityDisabledWhenItCannotHelp.kt"); - } - - @TestMetadata("addExclExclToRemoveNullabilityForGeneric.kt") - public void testAddExclExclToRemoveNullabilityForGeneric() throws Exception { - runTest("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForGeneric.kt"); - } - - @TestMetadata("addExclExclToRemoveNullabilityForSubclass.kt") - public void testAddExclExclToRemoveNullabilityForSubclass() throws Exception { - runTest("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForSubclass.kt"); - } - - @TestMetadata("addExclExclWhenSmartCastImpossible.kt") - public void testAddExclExclWhenSmartCastImpossible() throws Exception { - runTest("idea/testData/quickfix/typeMismatch/addExclExclWhenSmartCastImpossible.kt"); - } - @TestMetadata("addIntArrayOf.kt") public void testAddIntArrayOf() throws Exception { runTest("idea/testData/quickfix/typeMismatch/addIntArrayOf.kt");