Added more quickfixes; added tests
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// "Replace to dot call" "true"
|
||||
fun foo(a: Any) {
|
||||
<caret>a.equals(0)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Replace to dot call" "true"
|
||||
fun foo(a: Any) {
|
||||
when (a) {
|
||||
.equals(0) => true
|
||||
else => false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Replace a cast with a static assert" "true"
|
||||
fun foo(a: String) {
|
||||
val b = a : Any
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
fun foo(a: Any) {
|
||||
val b = a<caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove elvis operator" "true"
|
||||
fun foo(a: String) {
|
||||
val b : String = <caret>a
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Replace to dot call" "true"
|
||||
fun foo(a: Any) {
|
||||
a<caret>?.equals(0)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Replace to dot call" "true"
|
||||
fun foo(a: Any) {
|
||||
when (a) {
|
||||
<caret>?.equals(0) => true
|
||||
else => false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Replace a cast with a static assert" "true"
|
||||
fun foo(a: String) {
|
||||
val b = a <caret>as Any
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
fun foo(a: Any) {
|
||||
val b = a <caret>as Any
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove elvis operator" "true"
|
||||
fun foo(a: String) {
|
||||
val b : String = <caret>a ?: "s"
|
||||
}
|
||||
Reference in New Issue
Block a user