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
+6
-4
@@ -1,7 +1,9 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
infix fun Int.bar(i: Int) = this
|
||||
class SafeType {
|
||||
infix fun op(arg: Int) {}
|
||||
}
|
||||
|
||||
fun foo(i: Int?) {
|
||||
i <caret>bar 1
|
||||
}
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = p <caret>op 42
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
infix fun Int.bar(i: Int) = this
|
||||
class SafeType {
|
||||
infix fun op(arg: Int) {}
|
||||
}
|
||||
|
||||
fun foo(i: Int?) {
|
||||
i!! bar 1
|
||||
}
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = p!! op 42
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(a: List<String>?) {
|
||||
for (s in <caret>a) {}
|
||||
fun foo() {
|
||||
val test : Collection<Int>? = null!!
|
||||
for (i in <caret>test) { }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(a: List<String>?) {
|
||||
for (s in a!!) {}
|
||||
fun foo() {
|
||||
val test : Collection<Int>? = null!!
|
||||
for (i in <caret>test!!) { }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
fun foo(i: Int?) {
|
||||
i <caret>+ 1
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
fun foo(i: Int?) {
|
||||
i!! + 1
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
fun foo(i: Int?) {
|
||||
<caret>-i
|
||||
}
|
||||
class SafeType {
|
||||
operator fun unaryMinus() {}
|
||||
}
|
||||
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = <caret>-p
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
// "Add non-null asserted (!!) call" "true"
|
||||
|
||||
fun foo(i: Int?) {
|
||||
-i!!
|
||||
}
|
||||
class SafeType {
|
||||
operator fun unaryMinus() {}
|
||||
}
|
||||
|
||||
fun safeB(p: SafeType?) {
|
||||
val v = -p!!
|
||||
}
|
||||
|
||||
@@ -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,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!!
|
||||
}
|
||||
Reference in New Issue
Block a user