ReplaceJavaStaticMethodWithKotlinAnalogInspection: add more tests
This commit is contained in:
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
import java.util.Arrays
|
||||
|
||||
fun test() {
|
||||
val a = arrayOf(1, 2, 3)
|
||||
val b = arrayOf(1, 2, 3)
|
||||
Arrays.<caret>equals(a, b).let { println(it) }
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
import java.util.Arrays
|
||||
|
||||
fun test() {
|
||||
val a = arrayOf(1, 2, 3)
|
||||
val b = arrayOf(1, 2, 3)
|
||||
a.contentEquals(b).let { println(it) }
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
import java.lang.System.out
|
||||
|
||||
fun x() {
|
||||
out.<caret>print("test")
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
import java.lang.System.out
|
||||
|
||||
fun x() {
|
||||
print("test")
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
import java.lang.System.out
|
||||
|
||||
fun x() {
|
||||
listOf("")
|
||||
.take(10)
|
||||
.forEach { out.<caret>print(it) }
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
import java.lang.System.out
|
||||
|
||||
fun x() {
|
||||
listOf("")
|
||||
.take(10)
|
||||
.forEach { print(it) }
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
fun x() {
|
||||
listOf("")
|
||||
.take(10)
|
||||
.forEach { System.out.<caret>print(it) }
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
fun x() {
|
||||
listOf("")
|
||||
.take(10)
|
||||
.forEach { print(it) }
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
import java.lang.Math.abs
|
||||
|
||||
fun x() {
|
||||
listOf<Int>()
|
||||
.take(10)
|
||||
.filter { <caret>abs(it) < 10 }
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
import java.lang.Math.abs
|
||||
|
||||
fun x() {
|
||||
listOf<Int>()
|
||||
.take(10)
|
||||
.filter { kotlin.math.abs(it) < 10 }
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
fun x() {
|
||||
listOf<Int>()
|
||||
.take(10)
|
||||
.filter { Math.<caret>abs(it) < 10 }
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import kotlin.math.abs
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun x() {
|
||||
listOf<Int>()
|
||||
.take(10)
|
||||
.filter { abs(it) < 10 }
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
fun x() {
|
||||
val a = 4
|
||||
val b = Math.<caret>abs(a).let { println(it) }
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import kotlin.math.abs
|
||||
|
||||
// WITH_RUNTIME
|
||||
fun x() {
|
||||
val a = 4
|
||||
val b = abs(a).let { println(it) }
|
||||
}
|
||||
Reference in New Issue
Block a user