From e1efb952599fd97404ff5f6d0205b7562ce24732 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Fri, 5 Jun 2015 21:52:00 +0300 Subject: [PATCH] Added test --- .../NotAvailableOnDocComment.kt | 10 ++ .../inspectionData/expected.xml | 128 ++++++++++++++++++ .../inspectionData/inspections.test | 1 + .../JetInspectionTestGenerated.java | 6 + .../intentions/IntentionTestGenerated.java | 7 + 5 files changed, 152 insertions(+) create mode 100644 idea/testData/intentions/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt create mode 100644 idea/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/expected.xml create mode 100644 idea/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/inspections.test diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt new file mode 100644 index 00000000000..e9aef75581b --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt @@ -0,0 +1,10 @@ +// IS_APPLICABLE: false +/** + * This is a doc-comment + */ +@deprecated("") +fun foo() { + bar() +} + +fun bar(){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/expected.xml b/idea/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/expected.xml new file mode 100644 index 00000000000..9e7d7d4abb7 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/expected.xml @@ -0,0 +1,128 @@ + + + ValPropertyWithReturn.kt + 2 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + + ValProperty.kt + 2 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + StringTemplate.kt + 1 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + StringLiteral.kt + 1 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + Simple.kt + 1 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + Return.kt + 1 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + QualifiedCall.kt + 1 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + NotAvailableOnDocComment.kt + 2 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + NoDefaultImport.kt + 1 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + NoCompanionObjectImport.kt + 5 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + Imports.kt + 5 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + If.kt + 1 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + ExpressionBody.kt + 1 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + + + CommentInBody.kt + 1 + light_idea_test_case + + Add 'replaceWith' argument to 'deprecated' annotation + Add 'replaceWith' argument to specify replacement pattern + + \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/inspections.test b/idea/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/inspections.test new file mode 100644 index 00000000000..3a8ac1e6cc5 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/inspections.test @@ -0,0 +1 @@ +// INSPECTION_CLASS: org.jetbrains.kotlin.idea.intentions.DeprecatedCallableAddReplaceWithInspection diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/JetInspectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/JetInspectionTestGenerated.java index 16328ec8168..7f6314aa672 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/JetInspectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/JetInspectionTestGenerated.java @@ -55,6 +55,12 @@ public class JetInspectionTestGenerated extends AbstractJetInspectionTest { doTest(fileName); } + @TestMetadata("deprecatedCallableAddReplaceWith/inspectionData/inspections.test") + public void testDeprecatedCallableAddReplaceWith_inspectionData_Inspections_test() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/inspections.test"); + doTest(fileName); + } + @TestMetadata("removeExplicitTypeArguments/inspectionData/inspections.test") public void testRemoveExplicitTypeArguments_inspectionData_Inspections_test() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/inspectionData/inspections.test"); diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index dae733f214e..13f07d420a7 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -4558,6 +4558,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest { doTest(fileName); } + @TestMetadata("NotAvailableOnDocComment.kt") + public void testNotAvailableOnDocComment() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt"); + doTest(fileName); + } + @TestMetadata("PrivateSymbolUsed.kt") public void testPrivateSymbolUsed() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt"); @@ -4617,6 +4623,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt"); doTest(fileName); } + } @TestMetadata("idea/testData/intentions/ifNullToElvis")