diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/inheritance.kt b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/inheritance.kt new file mode 100644 index 00000000000..b99802aa196 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/inheritance.kt @@ -0,0 +1,17 @@ +// "Replace usages of 'OldClass' in whole project" "true" + +package ppp + +@deprecated("", ReplaceWith("NewClass")) +open class OldClass(val p: Int) { + constructor() : this(0) +} + +open class NewClass(val p: Int = 0) + +class Derived1 : OldClass(1) + +class Derived2 : OldClass { + constructor(p: Int) : super(p) + constructor() : super() +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/inheritance.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/inheritance.kt.after new file mode 100644 index 00000000000..2994af4a6b0 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/inheritance.kt.after @@ -0,0 +1,17 @@ +// "Replace usages of 'OldClass' in whole project" "true" + +package ppp + +@deprecated("", ReplaceWith("NewClass")) +open class OldClass(val p: Int) { + constructor() : this(0) +} + +open class NewClass(val p: Int = 0) + +class Derived1 : NewClass(1) + +class Derived2 : NewClass { + constructor(p: Int) : super(p) + constructor() : super() +} diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java index 8979ec50707..88a5ba274c1 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java @@ -3384,6 +3384,20 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest(fileName); } + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WholeProject extends AbstractQuickFixTest { + public void testAllFilesPresentInWholeProject() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + + @TestMetadata("inheritance.kt") + public void testInheritance() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/inheritance.kt"); + doTest(fileName); + } + } } @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments")