Add Java compare to ReplaceJavaStaticMethodWithTopLevelFunctionInspection

This commit is contained in:
Dmitry Gridin
2019-04-11 12:58:26 +07:00
parent 7f3c4a21d5
commit 23003c5d1a
16 changed files with 131 additions and 2 deletions
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = java.lang.Byte.<caret>compare(5, 6)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = 5.compareTo(6)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = java.lang.Character.<caret>compare('3', '4')
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = '3'.compareTo('4')
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = java.lang.Double.<caret>compare(5.0, 6.0)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = 5.0.compareTo(6.0)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = java.lang.Float.<caret>compare(5.0, 6.0)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = 5.0.compareTo(6.0)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = Integer.<caret>compare(5, 6)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = 5.compareTo(6)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = java.lang.Long.<caret>compare(5, 6)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = 5.compareTo(6)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = java.lang.Short.<caret>compare(5, 6)
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
val t = 5.compareTo(6)
}