Add more cases for ReplaceJavaStaticMethodWithTopLevelFunction from java.lang.Math

This commit is contained in:
Dmitry Gridin
2019-04-10 21:29:00 +07:00
parent 69120c0614
commit 50b89dd587
8 changed files with 93 additions and 10 deletions
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun test(x: Double, y: Double) {
<caret>Math.copySign(x, y)
}
@@ -0,0 +1,6 @@
import kotlin.math.withSign
// WITH_RUNTIME
fun test(x: Double, y: Double) {
x.withSign(y)
}
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun test(x: Double) {
<caret>Math.log(x)
}
@@ -0,0 +1,6 @@
import kotlin.math.ln
// WITH_RUNTIME
fun test(x: Double) {
<caret>ln(x)
}
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun test(x: Double) {
<caret>Math.log1p(x)
}
@@ -0,0 +1,6 @@
import kotlin.math.ln1p
// WITH_RUNTIME
fun test(x: Double) {
<caret>ln1p(x)
}