Rename ReplaceJavaStaticMethodWithTopLevelFunctionInspection to ReplaceJavaStaticMethodWithKotlinAnalogInspection
This commit is contained in:
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.IEEEremainder(x, y)
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.IEEErem
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
x.IEEErem(y)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.abs(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.abs
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
abs(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.acos(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.acos
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
acos(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.asin(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.asin
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
asin(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.atan(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.atan
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
atan(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.atan2(x, y)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.atan2
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
atan2(x, y)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.ceil(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.ceil
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
ceil(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.copySign(x, y)
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.withSign
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
x.withSign(y)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.cos(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.cos
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
cos(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.cosh(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.cosh
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
cosh(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.exp(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.exp
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
exp(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.expm1(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.expm1
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
expm1(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.floor(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.floor
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
floor(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.hypot(x, y)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.hypot
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
hypot(x, y)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.log(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.ln
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>ln(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.log10(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.log10
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
log10(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.log1p(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.ln1p
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>ln1p(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.max(x, y)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.max
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
max(x, y)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.min(x, y)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.min
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
min(x, y)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.nextAfter(x, y)
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.nextTowards
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
x.nextTowards(y)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// RUNTIME_WITH_FULL_JDK
|
||||
fun test(x: Double) {
|
||||
<caret>Math.nextDown(x)
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.nextDown
|
||||
|
||||
// RUNTIME_WITH_FULL_JDK
|
||||
fun test(x: Double) {
|
||||
x.nextDown()
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.nextUp(x)
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.nextUp
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
x.nextUp()
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
<caret>Math.pow(x, y)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.pow
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double, y: Double) {
|
||||
x.pow(y)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.rint(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.round
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
round(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.round(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
x.roundToLong()
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.signum(x)
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.sign
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
sign(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.sin(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.sin
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
sin(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.sinh(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.sinh
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
sinh(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.sqrt(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.sqrt
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
sqrt(x)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.tan(x)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import kotlin.math.tan
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
tan(x)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
<caret>Math.tanh(x)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import kotlin.math.tanh
|
||||
|
||||
// WITH_RUNTIME
|
||||
// WITH_RUNTIME
|
||||
fun test(x: Double) {
|
||||
tanh(x)
|
||||
}
|
||||
Reference in New Issue
Block a user