Additional tests for KT-21131

This commit is contained in:
Mikhail Glukhikh
2018-05-23 14:38:57 +03:00
parent f3c2dd0526
commit 4ed4754d80
5 changed files with 74 additions and 0 deletions
@@ -0,0 +1,16 @@
// "Replace with 'm'" "true"
private class C {
var m: String = ""
}
@Deprecated("", ReplaceWith("m"))
private var C.old: String
get() = m
set(value) {
m = value
}
private fun use(c: C) {
val x = c.old<caret>
}
@@ -0,0 +1,16 @@
// "Replace with 'm'" "true"
private class C {
var m: String = ""
}
@Deprecated("", ReplaceWith("m"))
private var C.old: String
get() = m
set(value) {
m = value
}
private fun use(c: C) {
val x = c.m
}
@@ -0,0 +1,16 @@
// "Replace with 'm'" "true"
private class C {
var m: String = ""
}
@Deprecated("", ReplaceWith("m"))
private var C.old: String
get() = m
set(value) {
m = value
}
private fun use(c: C, s: String) {
c.old<caret> = s
}
@@ -0,0 +1,16 @@
// "Replace with 'm'" "true"
private class C {
var m: String = ""
}
@Deprecated("", ReplaceWith("m"))
private var C.old: String
get() = m
set(value) {
m = value
}
private fun use(c: C, s: String) {
c.m = s
}
@@ -5679,6 +5679,16 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
public void testCallToProperty() throws Exception {
runTest("idea/testData/quickfix/deprecatedSymbolUsage/properties/callToProperty.kt");
}
@TestMetadata("extensionPropertyToProperty.kt")
public void testExtensionPropertyToProperty() throws Exception {
runTest("idea/testData/quickfix/deprecatedSymbolUsage/properties/extensionPropertyToProperty.kt");
}
@TestMetadata("extensionPropertyWriteToProperty.kt")
public void testExtensionPropertyWriteToProperty() throws Exception {
runTest("idea/testData/quickfix/deprecatedSymbolUsage/properties/extensionPropertyWriteToProperty.kt");
}
}
@TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi")