FIR IDE: Consolidate tests for AddExclExclFix in one directory.
I found these tests only _after_ the previous changes, so I needed to merge and/or remove redundant tests.
This commit is contained in:
committed by
Ilya Kirillov
parent
db82797f58
commit
efa3bf9c69
@@ -1,9 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
class SafeType {
|
||||
operator fun plus(arg: Int) {}
|
||||
}
|
||||
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = p <caret>+ 42
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
class SafeType {
|
||||
operator fun plus(arg: Int) {}
|
||||
}
|
||||
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = p!! + 42
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
class SafeType {
|
||||
infix fun op(arg: Int) {}
|
||||
}
|
||||
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = p <caret>op 42
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
class SafeType {
|
||||
infix fun op(arg: Int) {}
|
||||
}
|
||||
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = p!! op 42
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
fun <T: Collection<Int>?> foo(c: T) {
|
||||
for (i in <caret>c) { }
|
||||
}
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
fun <T: Collection<Int>?> foo(c: T) {
|
||||
for (i in c!!) { }
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
fun foo() {
|
||||
val test : Collection<Int>? = null!!
|
||||
for (i in <caret>test) { }
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
fun foo() {
|
||||
val test : Collection<Int>? = null!!
|
||||
for (i in <caret>test!!) { }
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
class SafeType {
|
||||
operator fun unaryMinus() {}
|
||||
}
|
||||
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = <caret>-p
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
class SafeType {
|
||||
operator fun unaryMinus() {}
|
||||
}
|
||||
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = -p!!
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "false"
|
||||
// ACTION: Replace with a 'forEach' function call
|
||||
// ACTION: Surround with null check
|
||||
// ERROR: Not nullable value required to call an 'iterator()' method on for-loop range
|
||||
|
||||
class Some {
|
||||
fun iterator(): Iterator<Int> = null!!
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val test: Some? = Some()
|
||||
for (i in <caret>test) { }
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
class Some {
|
||||
operator fun iterator(): Iterator<Int> = null!!
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val test: Some? = Some()
|
||||
for (i in <caret>test) { }
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
class Some {
|
||||
operator fun iterator(): Iterator<Int> = null!!
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val test: Some? = Some()
|
||||
for (i in test!!) { }
|
||||
}
|
||||
Reference in New Issue
Block a user