From 0cf318918cf9989bb880a1077a8931a347c44a7e Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 21 May 2019 13:11:21 +0300 Subject: [PATCH] Clean & fix tests in "replace manual range with indices / iteration" Related to KT-14344 --- ...> ReplaceManualRangeWithIndicesCalls.html} | 0 .../.inspection | 0 .../forNotTarget.kt | 0 .../indexInLvalue.kt | 0 .../indexInLvalue.kt.after | 0 .../notUsedAsIndex.kt | 0 .../notUsedAsIndex.kt.after | 0 .../simpleExpression.kt | 0 .../simpleExpression.kt.after | 0 .../simpleExpressionUntil.kt | 0 .../simpleExpressionUntil.kt.after | 0 .../simpleFor.kt | 0 .../simpleFor.kt.after | 0 .../LocalInspectionTestGenerated.java | 20 +++++++++---------- 14 files changed, 10 insertions(+), 10 deletions(-) rename idea/resources/inspectionDescriptions/{ReplaceManualRangeWithIndicesCallsInspection.html => ReplaceManualRangeWithIndicesCalls.html} (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/.inspection (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/forNotTarget.kt (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/indexInLvalue.kt (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/indexInLvalue.kt.after (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/notUsedAsIndex.kt (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/notUsedAsIndex.kt.after (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/simpleExpression.kt (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/simpleExpression.kt.after (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/simpleExpressionUntil.kt (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/simpleExpressionUntil.kt.after (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/simpleFor.kt (100%) rename idea/testData/inspectionsLocal/{replaceManualRangeWithIndicesCallsInspection => replaceManualRangeWithIndicesCalls}/simpleFor.kt.after (100%) diff --git a/idea/resources/inspectionDescriptions/ReplaceManualRangeWithIndicesCallsInspection.html b/idea/resources/inspectionDescriptions/ReplaceManualRangeWithIndicesCalls.html similarity index 100% rename from idea/resources/inspectionDescriptions/ReplaceManualRangeWithIndicesCallsInspection.html rename to idea/resources/inspectionDescriptions/ReplaceManualRangeWithIndicesCalls.html diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/.inspection b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/.inspection similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/.inspection rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/.inspection diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/forNotTarget.kt b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/forNotTarget.kt similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/forNotTarget.kt rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/forNotTarget.kt diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/indexInLvalue.kt b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/indexInLvalue.kt similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/indexInLvalue.kt rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/indexInLvalue.kt diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/indexInLvalue.kt.after b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/indexInLvalue.kt.after similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/indexInLvalue.kt.after rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/indexInLvalue.kt.after diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/notUsedAsIndex.kt b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/notUsedAsIndex.kt similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/notUsedAsIndex.kt rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/notUsedAsIndex.kt diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/notUsedAsIndex.kt.after b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/notUsedAsIndex.kt.after similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/notUsedAsIndex.kt.after rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/notUsedAsIndex.kt.after diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpression.kt b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpression.kt similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpression.kt rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpression.kt diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpression.kt.after b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpression.kt.after similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpression.kt.after rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpression.kt.after diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpressionUntil.kt b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpressionUntil.kt similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpressionUntil.kt rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpressionUntil.kt diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpressionUntil.kt.after b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpressionUntil.kt.after similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpressionUntil.kt.after rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpressionUntil.kt.after diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleFor.kt b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleFor.kt similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleFor.kt rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleFor.kt diff --git a/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleFor.kt.after b/idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleFor.kt.after similarity index 100% rename from idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleFor.kt.after rename to idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleFor.kt.after diff --git a/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java index 28f307daebe..939fe8dbdab 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java @@ -7757,46 +7757,46 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { } } - @TestMetadata("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection") + @TestMetadata("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class ReplaceManualRangeWithIndicesCallsInspection extends AbstractLocalInspectionTest { + public static class ReplaceManualRangeWithIndicesCalls extends AbstractLocalInspectionTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInReplaceManualRangeWithIndicesCallsInspection() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + public void testAllFilesPresentInReplaceManualRangeWithIndicesCalls() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("forNotTarget.kt") public void testForNotTarget() throws Exception { - runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/forNotTarget.kt"); + runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/forNotTarget.kt"); } @TestMetadata("indexInLvalue.kt") public void testIndexInLvalue() throws Exception { - runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/indexInLvalue.kt"); + runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/indexInLvalue.kt"); } @TestMetadata("notUsedAsIndex.kt") public void testNotUsedAsIndex() throws Exception { - runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/notUsedAsIndex.kt"); + runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/notUsedAsIndex.kt"); } @TestMetadata("simpleExpression.kt") public void testSimpleExpression() throws Exception { - runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpression.kt"); + runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpression.kt"); } @TestMetadata("simpleExpressionUntil.kt") public void testSimpleExpressionUntil() throws Exception { - runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleExpressionUntil.kt"); + runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleExpressionUntil.kt"); } @TestMetadata("simpleFor.kt") public void testSimpleFor() throws Exception { - runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCallsInspection/simpleFor.kt"); + runTest("idea/testData/inspectionsLocal/replaceManualRangeWithIndicesCalls/simpleFor.kt"); } }