diff --git a/idea/resources/intentionDescriptions/IntroduceWhenSubjectIntention/after.kt.template b/idea/resources/intentionDescriptions/IntroduceWhenSubjectIntention/after.kt.template deleted file mode 100644 index 949cf0ab13d..00000000000 --- a/idea/resources/intentionDescriptions/IntroduceWhenSubjectIntention/after.kt.template +++ /dev/null @@ -1,11 +0,0 @@ -when (n) { - 1 -> { - res = "one" - } - 2 -> { - res = "two" - } - else -> { - res = "???" - } -} \ No newline at end of file diff --git a/idea/resources/intentionDescriptions/IntroduceWhenSubjectIntention/before.kt.template b/idea/resources/intentionDescriptions/IntroduceWhenSubjectIntention/before.kt.template deleted file mode 100644 index a3b53a936d0..00000000000 --- a/idea/resources/intentionDescriptions/IntroduceWhenSubjectIntention/before.kt.template +++ /dev/null @@ -1,11 +0,0 @@ -when { - n == 1 -> { - res = "one" - } - n == 2 -> { - res = "two" - } - else -> { - res = "???" - } -} \ No newline at end of file diff --git a/idea/resources/intentionDescriptions/IntroduceWhenSubjectIntention/description.html b/idea/resources/intentionDescriptions/IntroduceWhenSubjectIntention/description.html deleted file mode 100644 index 09ef51ee060..00000000000 --- a/idea/resources/intentionDescriptions/IntroduceWhenSubjectIntention/description.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This intention introduces argument into 'when' expression simplifying conditions of its branches - - \ No newline at end of file diff --git a/idea/src/META-INF/plugin.xml b/idea/src/META-INF/plugin.xml index cc5f87e3252..6777fa3ceaf 100644 --- a/idea/src/META-INF/plugin.xml +++ b/idea/src/META-INF/plugin.xml @@ -902,11 +902,6 @@ Kotlin - - org.jetbrains.kotlin.idea.intentions.branchedTransformations.intentions.IntroduceWhenSubjectIntention - Kotlin - - org.jetbrains.kotlin.idea.intentions.branchedTransformations.intentions.EliminateWhenSubjectIntention Kotlin @@ -1675,7 +1670,7 @@ language="kotlin" /> - () { + override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean, session: LocalInspectionToolSession): KtVisitorVoid = + object : KtVisitorVoid() { + override fun visitWhenExpression(expression: KtWhenExpression) { + super.visitWhenExpression(expression) + visitTargetElement(expression, holder, isOnTheFly) + } + } + + override fun isApplicable(element: KtWhenExpression) = element.getSubjectToIntroduce() != null + + override fun inspectionTarget(element: KtWhenExpression) = element.whenKeyword + + override fun inspectionText(element: KtWhenExpression) = "'when' with argument should be used" + + override val defaultFixText = "Introduce 'when' argument" + + override fun fixText(element: KtWhenExpression): String { + val subject = element.getSubjectToIntroduce() ?: return "" + return "Introduce '${subject.text}' as argument to 'when'" + } + + override fun applyTo(element: PsiElement, project: Project, editor: Editor?) { + element.getParentOfType(strict = true)?.introduceSubject() + } +} diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IntroduceWhenSubjectIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IntroduceWhenSubjectIntention.kt deleted file mode 100644 index 8a2f2af2013..00000000000 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IntroduceWhenSubjectIntention.kt +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.idea.intentions.branchedTransformations.intentions - -import com.intellij.openapi.editor.Editor -import com.intellij.openapi.util.TextRange -import org.jetbrains.kotlin.idea.inspections.IntentionBasedInspection -import org.jetbrains.kotlin.idea.intentions.SelfTargetingRangeIntention -import org.jetbrains.kotlin.idea.intentions.branchedTransformations.getSubjectToIntroduce -import org.jetbrains.kotlin.idea.intentions.branchedTransformations.introduceSubject -import org.jetbrains.kotlin.psi.KtWhenExpression - -class IntroduceWhenSubjectInspection : IntentionBasedInspection(IntroduceWhenSubjectIntention::class) - -class IntroduceWhenSubjectIntention : SelfTargetingRangeIntention(KtWhenExpression::class.java, "Introduce argument to 'when'") { - override fun applicabilityRange(element: KtWhenExpression): TextRange? { - val subject = element.getSubjectToIntroduce() ?: return null - text = "Introduce '${subject.text}' as argument to 'when'" - return element.whenKeyword.textRange - } - - override fun applyTo(element: KtWhenExpression, editor: Editor?) { - element.introduceSubject() - } -} diff --git a/idea/testData/inspectionsLocal/branched/introduceWhenSubject/.inspection b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/.inspection new file mode 100644 index 00000000000..f042a367e49 --- /dev/null +++ b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/.inspection @@ -0,0 +1 @@ +org.jetbrains.kotlin.idea.inspections.branchedTransformations.IntroduceWhenSubjectInspection diff --git a/idea/testData/intentions/branched/when/introduceSubject/lineBreaksAndComments.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/lineBreaksAndComments.kt similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/lineBreaksAndComments.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/lineBreaksAndComments.kt diff --git a/idea/testData/intentions/branched/when/introduceSubject/lineBreaksAndComments.kt.after b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/lineBreaksAndComments.kt.after similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/lineBreaksAndComments.kt.after rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/lineBreaksAndComments.kt.after diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithEqualityTests.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithEqualityTests.kt similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithEqualityTests.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithEqualityTests.kt diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithEqualityTests.kt.after b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithEqualityTests.kt.after similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithEqualityTests.kt.after rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithEqualityTests.kt.after diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithMultipleConditionTypes.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithMultipleConditionTypes.kt similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithMultipleConditionTypes.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithMultipleConditionTypes.kt diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithMultipleConditionTypes.kt.after b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithMultipleConditionTypes.kt.after similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithMultipleConditionTypes.kt.after rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithMultipleConditionTypes.kt.after diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithNegativePatterns.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativePatterns.kt similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithNegativePatterns.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativePatterns.kt diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithNegativePatterns.kt.after b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativePatterns.kt.after similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithNegativePatterns.kt.after rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativePatterns.kt.after diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithNegativeRangeTests.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativeRangeTests.kt similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithNegativeRangeTests.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativeRangeTests.kt diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithNegativeRangeTests.kt.after b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativeRangeTests.kt.after similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithNegativeRangeTests.kt.after rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativeRangeTests.kt.after diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithNondivisibleConditions.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNondivisibleConditions.kt similarity index 89% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithNondivisibleConditions.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNondivisibleConditions.kt index b69f02078a4..3efb981f290 100644 --- a/idea/testData/intentions/branched/when/introduceSubject/whenWithNondivisibleConditions.kt +++ b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNondivisibleConditions.kt @@ -1,4 +1,4 @@ -//IS_APPLICABLE: false +// PROBLEM: none fun test(n: Int): String { return when { n in 0..10 -> "small" diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithPatterns.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithPatterns.kt similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithPatterns.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithPatterns.kt diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithPatterns.kt.after b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithPatterns.kt.after similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithPatterns.kt.after rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithPatterns.kt.after diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithRangeTests.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithRangeTests.kt similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithRangeTests.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithRangeTests.kt diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithRangeTests.kt.after b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithRangeTests.kt.after similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithRangeTests.kt.after rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithRangeTests.kt.after diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithSubject.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSubject.kt similarity index 88% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithSubject.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSubject.kt index 2aaf349558d..158b93f5384 100644 --- a/idea/testData/intentions/branched/when/introduceSubject/whenWithSubject.kt +++ b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSubject.kt @@ -1,4 +1,4 @@ -//IS_APPLICABLE: false +// PROBLEM: none fun test(n: Int): String { return when(n) { in 0..10 -> "small" diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithSwappedEqualityTests.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSwappedEqualityTests.kt similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithSwappedEqualityTests.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSwappedEqualityTests.kt diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithSwappedEqualityTests.kt.after b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSwappedEqualityTests.kt.after similarity index 100% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithSwappedEqualityTests.kt.after rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSwappedEqualityTests.kt.after diff --git a/idea/testData/intentions/branched/when/introduceSubject/whenWithUnmatchedCandidateSubjects.kt b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithUnmatchedCandidateSubjects.kt similarity index 89% rename from idea/testData/intentions/branched/when/introduceSubject/whenWithUnmatchedCandidateSubjects.kt rename to idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithUnmatchedCandidateSubjects.kt index 1077ec19255..b41f1e4a220 100644 --- a/idea/testData/intentions/branched/when/introduceSubject/whenWithUnmatchedCandidateSubjects.kt +++ b/idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithUnmatchedCandidateSubjects.kt @@ -1,4 +1,4 @@ -//IS_APPLICABLE: false +// PROBLEM: none fun test(n: Int): String { return when { n in 0..10 -> "n is small" diff --git a/idea/testData/intentions/branched/when/introduceSubject/.intention b/idea/testData/intentions/branched/when/introduceSubject/.intention deleted file mode 100644 index 61258d839f3..00000000000 --- a/idea/testData/intentions/branched/when/introduceSubject/.intention +++ /dev/null @@ -1 +0,0 @@ -org.jetbrains.kotlin.idea.intentions.branchedTransformations.intentions.IntroduceWhenSubjectIntention diff --git a/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java index ded5a552966..09a45e056d9 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java @@ -349,6 +349,81 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { doTest(fileName); } } + + @TestMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IntroduceWhenSubject extends AbstractLocalInspectionTest { + public void testAllFilesPresentInIntroduceWhenSubject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/branched/introduceWhenSubject"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } + + @TestMetadata("lineBreaksAndComments.kt") + public void testLineBreaksAndComments() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/lineBreaksAndComments.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithEqualityTests.kt") + public void testWhenWithEqualityTests() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithEqualityTests.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithMultipleConditionTypes.kt") + public void testWhenWithMultipleConditionTypes() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithMultipleConditionTypes.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithNegativePatterns.kt") + public void testWhenWithNegativePatterns() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativePatterns.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithNegativeRangeTests.kt") + public void testWhenWithNegativeRangeTests() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativeRangeTests.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithNondivisibleConditions.kt") + public void testWhenWithNondivisibleConditions() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNondivisibleConditions.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithPatterns.kt") + public void testWhenWithPatterns() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithPatterns.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithRangeTests.kt") + public void testWhenWithRangeTests() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithRangeTests.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithSubject.kt") + public void testWhenWithSubject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSubject.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithSwappedEqualityTests.kt") + public void testWhenWithSwappedEqualityTests() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSwappedEqualityTests.kt"); + doTest(fileName); + } + + @TestMetadata("whenWithUnmatchedCandidateSubjects.kt") + public void testWhenWithUnmatchedCandidateSubjects() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithUnmatchedCandidateSubjects.kt"); + doTest(fileName); + } + } } @TestMetadata("idea/testData/inspectionsLocal/canBeVal") diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 34a4547967a..8ba31c75e25 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -2593,81 +2593,6 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } } - @TestMetadata("idea/testData/intentions/branched/when/introduceSubject") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class IntroduceSubject extends AbstractIntentionTest { - public void testAllFilesPresentInIntroduceSubject() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/introduceSubject"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); - } - - @TestMetadata("lineBreaksAndComments.kt") - public void testLineBreaksAndComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/lineBreaksAndComments.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithEqualityTests.kt") - public void testWhenWithEqualityTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithEqualityTests.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithMultipleConditionTypes.kt") - public void testWhenWithMultipleConditionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithMultipleConditionTypes.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithNegativePatterns.kt") - public void testWhenWithNegativePatterns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithNegativePatterns.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithNegativeRangeTests.kt") - public void testWhenWithNegativeRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithNegativeRangeTests.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithNondivisibleConditions.kt") - public void testWhenWithNondivisibleConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithNondivisibleConditions.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithPatterns.kt") - public void testWhenWithPatterns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithPatterns.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithRangeTests.kt") - public void testWhenWithRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithRangeTests.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithSubject.kt") - public void testWhenWithSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithSubject.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithSwappedEqualityTests.kt") - public void testWhenWithSwappedEqualityTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithSwappedEqualityTests.kt"); - doTest(fileName); - } - - @TestMetadata("whenWithUnmatchedCandidateSubjects.kt") - public void testWhenWithUnmatchedCandidateSubjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/introduceSubject/whenWithUnmatchedCandidateSubjects.kt"); - doTest(fileName); - } - } - @TestMetadata("idea/testData/intentions/branched/when/merge") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)