ReplaceJavaStaticMethodWithKotlinAnalogInspection: introduce Transform interface
#KT-32454 Fixed
This commit is contained in:
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.IEEEremainder(x, y)
|
||||
Math.<caret>IEEEremainder(x, y)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.abs(x)
|
||||
Math.abs<caret>(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.acos(x)
|
||||
Math.<caret>acos(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.asin(x)
|
||||
Math.<caret>asin(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.atan(x)
|
||||
Math.<caret>atan(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.atan2(x, y)
|
||||
Math.<caret>atan2(x, y)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.ceil(x)
|
||||
Math.<caret>ceil(x)
|
||||
}
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FIX: Replace with `coerceAtLeast` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.max(x, y)
|
||||
Math.<caret>max(x, y)
|
||||
}
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FIX: Replace with `coerceAtMost` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.min(x, y)
|
||||
Math.<caret>min(x, y)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.copySign(x, y)
|
||||
Math.<caret>copySign(x, y)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.cos(x)
|
||||
Math.<caret>cos(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.cosh(x)
|
||||
Math.<caret>cosh(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.exp(x)
|
||||
Math.<caret>exp(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.expm1(x)
|
||||
Math.<caret>expm1(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.floor(x)
|
||||
Math.<caret>floor(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.hypot(x, y)
|
||||
Math.<caret>hypot(x, y)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.log(x)
|
||||
Math.<caret>log(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.log10(x)
|
||||
Math.<caret>log10(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.log1p(x)
|
||||
Math.<caret>log1p(x)
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FIX: Replace with `max` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.max(x, y)
|
||||
Math.<caret>max(x, y)
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FIX: Replace with `min` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.min(x, y)
|
||||
Math.<caret>min(x, y)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.nextAfter(x, y)
|
||||
Math.<caret>nextAfter(x, y)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// RUNTIME_WITH_FULL_JDK
|
||||
fun test(x: Double) {
|
||||
<caret>Math.nextDown(x)
|
||||
Math.<caret>nextDown(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.nextUp(x)
|
||||
Math.<caret>nextUp(x)
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// PROBLEM: none
|
||||
fun test(x: Double) {
|
||||
<caret>Math.abs(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.pow(x, y)
|
||||
Math.<caret>pow(x, y)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.rint(x)
|
||||
Math.<caret>rint(x)
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FIX: Replace with `roundToInt` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.round(x)
|
||||
Math.<caret>round(x)
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FIX: Replace with `roundToLong` function
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.round(x)
|
||||
Math.<caret>round(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.signum(x)
|
||||
Math.<caret>signum(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.sin(x)
|
||||
Math.<caret>sin(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.sinh(x)
|
||||
Math.<caret>sinh(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.sqrt(x)
|
||||
Math.<caret>sqrt(x)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.tan(x)
|
||||
Math.<caret>tan(x)
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.tanh(x)
|
||||
Math.<caret>tanh(x)
|
||||
}
|
||||
Reference in New Issue
Block a user