FIR IDE: use IGNORE_FIR instead of FIR_COMPARISON in hl quick fix tests

To explicitly specify which test are failing
This commit is contained in:
Ilya Kirillov
2021-03-29 13:35:48 +02:00
parent 18ab9c7b25
commit bd38363077
384 changed files with 447 additions and 264 deletions
@@ -6,4 +6,5 @@ class SafeType {
fun safeB(p: SafeType?) {
val v = p <caret>+ 42
}
}
/* IGNORE_FIR */
@@ -6,4 +6,5 @@ class SafeType {
fun safeB(p: SafeType?) {
val v = p!! + 42
}
}
/* IGNORE_FIR */
@@ -6,4 +6,5 @@ class SafeType {
fun safeB(p: SafeType?) {
val v = p <caret>op 42
}
}
/* IGNORE_FIR */
@@ -6,4 +6,5 @@ class SafeType {
fun safeB(p: SafeType?) {
val v = p!! op 42
}
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun <T: Collection<Int>?> foo(c: T) {
for (i in <caret>c) { }
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun <T: Collection<Int>?> foo(c: T) {
for (i in c!!) { }
}
/* IGNORE_FIR */
@@ -3,3 +3,5 @@ fun foo() {
val test : Collection<Int>? = null!!
for (i in <caret>test) { }
}
/* IGNORE_FIR */
@@ -3,3 +3,5 @@ fun foo() {
val test : Collection<Int>? = null!!
for (i in <caret>test!!) { }
}
/* IGNORE_FIR */
@@ -6,4 +6,5 @@ class SafeType {
fun safeB(p: SafeType?) {
val v = <caret>-p
}
}
/* IGNORE_FIR */
@@ -6,4 +6,5 @@ class SafeType {
fun safeB(p: SafeType?) {
val v = -p!!
}
}
/* IGNORE_FIR */
@@ -11,4 +11,3 @@ fun foo() {
val test: Some? = Some()
for (i in <caret>test) { }
}
/* FIR_COMPARISON */
@@ -7,3 +7,5 @@ fun foo() {
val test: Some? = Some()
for (i in <caret>test) { }
}
/* IGNORE_FIR */
@@ -7,3 +7,5 @@ fun foo() {
val test: Some? = Some()
for (i in test!!) { }
}
/* IGNORE_FIR */
+2 -1
View File
@@ -4,4 +4,5 @@ fun callMe(p: String) {}
fun callIt(p: Any) {
callMe(<caret>p as String?)
}
}
/* IGNORE_FIR */
+2 -1
View File
@@ -4,4 +4,5 @@ fun callMe(p: String) {}
fun callIt(p: Any) {
callMe(<caret>(p as String?)!!)
}
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun foo(a: String) {
val b = a <caret>as String
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun foo(a: String) {
val b = a
}
/* IGNORE_FIR */
@@ -1,4 +1,5 @@
// "Remove useless cast" "true"
fun test() {
({ "" } as<caret> () -> String)
}
}
/* IGNORE_FIR */
@@ -1,4 +1,5 @@
// "Remove useless cast" "true"
fun test() {
{ "" }
}
}
/* IGNORE_FIR */
@@ -5,4 +5,5 @@ fun test() {
foo()
// comment
({ "" } as<caret> () -> String)
}
}
/* IGNORE_FIR */
@@ -5,4 +5,5 @@ fun test() {
foo()
// comment
({ "" })
}
}
/* IGNORE_FIR */
@@ -6,4 +6,5 @@ class A {
fun test() {
A().foo()
({ "" } as<caret> () -> String)
}
}
/* IGNORE_FIR */
@@ -6,4 +6,5 @@ class A {
fun test() {
A().foo()
({ "" })
}
}
/* IGNORE_FIR */
@@ -2,4 +2,5 @@
fun test() {
class A()
({ "" } as<caret> () -> String)
}
}
/* IGNORE_FIR */
@@ -2,4 +2,5 @@
fun test() {
class A()
({ "" })
}
}
/* IGNORE_FIR */
@@ -4,4 +4,5 @@ open class A
fun test() {
class B : A()
({ "" } as<caret> () -> String)
}
}
/* IGNORE_FIR */
@@ -4,4 +4,5 @@ open class A
fun test() {
class B : A()
({ "" })
}
}
/* IGNORE_FIR */
@@ -5,3 +5,5 @@ fun main() {
foo();
({ "" } as<caret> () -> String)
}
/* IGNORE_FIR */
@@ -5,3 +5,5 @@ fun main() {
foo();
{ "" }
}
/* IGNORE_FIR */
@@ -5,3 +5,5 @@ fun test(x: Any): Int {
}
return -1
}
/* IGNORE_FIR */
@@ -5,3 +5,5 @@ fun test(x: Any): Int {
}
return -1
}
/* IGNORE_FIR */
@@ -5,3 +5,5 @@ fun test(x: Any): String? {
}
return null
}
/* IGNORE_FIR */
@@ -5,3 +5,5 @@ fun test(x: Any): String? {
}
return null
}
/* IGNORE_FIR */
@@ -4,3 +4,5 @@ fun foo(a: String) {
}
}
/* IGNORE_FIR */
@@ -4,3 +4,5 @@ fun foo(a: String) {
}
}
/* IGNORE_FIR */
@@ -9,3 +9,5 @@ fun foo(bar: Base):Int {
else -> 1
}
}
/* IGNORE_FIR */
@@ -8,3 +8,5 @@ fun foo(bar: Base):Int {
else -> 42
}
}
/* IGNORE_FIR */
@@ -9,4 +9,5 @@ fun foo(bar: Base):Int {
bar <caret>is Base -> 42
else -> 1
}
}
}
/* IGNORE_FIR */
@@ -9,4 +9,5 @@ fun foo(bar: Base):Int {
true -> 42
else -> 1
}
}
}
/* IGNORE_FIR */
@@ -9,4 +9,5 @@ fun foo(bar: Base):Int {
bar <caret>!is Base -> 42
else -> 1
}
}
}
/* IGNORE_FIR */
@@ -9,4 +9,5 @@ fun foo(bar: Base):Int {
false -> 42
else -> 1
}
}
}
/* IGNORE_FIR */
@@ -9,3 +9,5 @@ fun foo(bar: Base):Int {
else -> 1
}
}
/* IGNORE_FIR */
@@ -8,3 +8,5 @@ fun foo(bar: Base):Int {
else -> 1
}
}
/* IGNORE_FIR */
@@ -4,3 +4,5 @@ fun foo(a: String) {
}
}
/* IGNORE_FIR */
@@ -4,3 +4,5 @@ fun foo(a: String) {
}
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun test(value : Int) : Int {
return value<caret>!!
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun test(value : Int) : Int {
return value<caret>
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun test(value : String) {
value!!<caret>.equals("test")
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun test(value : String) {
value<caret>.equals("test")
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun test(value : String) : Int {
return value<caret>!!.length
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun test(value : String) : Int {
return value<caret>.length
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun foo(a: Any) {
a<caret>?.equals(0)
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun foo(a: Any) {
a<caret>.equals(0)
}
/* IGNORE_FIR */
+2 -1
View File
@@ -1,4 +1,5 @@
// "Replace with safe (?.) call" "true"
fun foo(a: Int?) {
a<caret>.plus(1)
}
}
/* IGNORE_FIR */
+2 -1
View File
@@ -1,4 +1,5 @@
// "Replace with safe (?.) call" "true"
fun foo(a: Int?) {
a?.plus(1)
}
}
/* IGNORE_FIR */
+2
View File
@@ -2,3 +2,5 @@
fun foo(a: Int?) {
a<caret>.plus(1)
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun foo(a: Int?) {
a!!.plus(1)
}
/* IGNORE_FIR */
+2
View File
@@ -2,3 +2,5 @@
fun foo(a: Int?) {
a.<caret>plus(1)
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun foo(a: Int?) {
a!!.plus(1)
}
/* IGNORE_FIR */
+2 -1
View File
@@ -1,4 +1,5 @@
// "Add non-null asserted (!!) call" "true"
operator fun Int.get(row: Int, column: Int) = this
fun foo(arg: Int?) = arg<caret>[42, 13]
fun foo(arg: Int?) = arg<caret>[42, 13]
/* IGNORE_FIR */
+2 -1
View File
@@ -1,4 +1,5 @@
// "Add non-null asserted (!!) call" "true"
operator fun Int.get(row: Int, column: Int) = this
fun foo(arg: Int?) = arg!![42, 13]
fun foo(arg: Int?) = arg!![42, 13]
/* IGNORE_FIR */
+2 -1
View File
@@ -1,4 +1,5 @@
// "Add non-null asserted (!!) call" "true"
operator fun Int.get(row: Int, column: Int) = if (row == column) this else null
fun foo(arg: Int) = arg[42, 13]<caret>.hashCode()
fun foo(arg: Int) = arg[42, 13]<caret>.hashCode()
/* IGNORE_FIR */
+2 -1
View File
@@ -1,4 +1,5 @@
// "Add non-null asserted (!!) call" "true"
operator fun Int.get(row: Int, column: Int) = if (row == column) this else null
fun foo(arg: Int) = arg[42, 13]!!.hashCode()
fun foo(arg: Int) = arg[42, 13]!!.hashCode()
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun foo(a: Any) {
val b = a <caret>as Any
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun foo(a: Any) {
val b = a<caret>
}
/* IGNORE_FIR */
+2
View File
@@ -2,3 +2,5 @@
fun foo(a: String) {
val b : String = a <caret>?: "s"
}
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
fun foo(a: String) {
val b : String = a<caret>
}
/* IGNORE_FIR */