Add regression test for ReplaceWith

#KT-35015 Fixed
This commit is contained in:
Dmitry Gridin
2020-05-19 16:08:08 +07:00
parent 02c17378b1
commit 12217ef2ab
3 changed files with 29 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
// "Replace with 'kotlin.math.cos(x)'" "true"
package package1
import package1.Math.cos
object Math {
@Deprecated("Replace", ReplaceWith("kotlin.math.cos(x)", "kotlin.math.cos"))
fun cos(x: Double): Double = kotlin.math.cos(x)
}
val test = <caret>cos(kotlin.math.PI)
@@ -0,0 +1,12 @@
// "Replace with 'kotlin.math.cos(x)'" "true"
package package1
import package1.Math.cos
object Math {
@Deprecated("Replace", ReplaceWith("kotlin.math.cos(x)", "kotlin.math.cos"))
fun cos(x: Double): Double = kotlin.math.cos(x)
}
val test = kotlin.math.cos(kotlin.math.PI)
@@ -6185,6 +6185,11 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepInfixCall.kt");
}
@TestMetadata("kt35015.kt")
public void testKt35015() throws Exception {
runTest("idea/testData/quickfix/deprecatedSymbolUsage/kt35015.kt");
}
@TestMetadata("localFun.kt")
public void testLocalFun() throws Exception {
runTest("idea/testData/quickfix/deprecatedSymbolUsage/localFun.kt");