Quickfix and intention tests refactoring: refer to intention action by class when checking that it's not available (instead of listing all available actions)

This commit is contained in:
Valentin Kipyatkov
2014-01-23 17:00:26 +04:00
parent 3028cec4cd
commit d01ff28212
75 changed files with 99 additions and 136 deletions
@@ -1,4 +1,4 @@
// "Suppress 'REDUNDANT_NULLABLE' for fun foo" "false"
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
[suppress("REDUNDANT_NULLABLE")]
fun foo(): String?<caret>? = null
@@ -1,5 +1,4 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "false"
// ACTION: Remove unnecessary non-null assertion (!!)
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
[suppress("FOO"<caret>!!)]
fun foo() {}
@@ -1,5 +1,4 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "false"
// ACTION: Remove unnecessary non-null assertion (!!)
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
open class Base(s: String)
class Child: Base(""<caret>!!)
@@ -1,4 +1,3 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "false"
// ACTION: Remove unnecessary non-null assertion (!!)
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
fun foo(s: String = ""<caret>!!) {}
@@ -1,4 +1,3 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "false"
// ACTION: Remove unnecessary non-null assertion (!!)
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
fun foo() = ""<caret>!!
@@ -1,8 +1,4 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "false"
// ACTION: Disable 'Split Property Declaration'
// ACTION: Edit intention settings
// ACTION: Remove unnecessary non-null assertion (!!)
// ACTION: Split property declaration
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
fun foo() {
val bar = ""<caret>!!
@@ -1,4 +1,3 @@
// "Suppress 'REDUNDANT_NULLABLE' for statement " "false"
// ACTION: Remove redundant '?'
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
fun foo(s: String?<caret>?) {}
@@ -1,5 +1,4 @@
// "Suppress 'REDUNDANT_NULLABLE' for statement " "false"
// ACTION: Remove redundant '?'
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
fun foo() {
any {
@@ -1,4 +1,3 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "false"
// ACTION: Remove unnecessary non-null assertion (!!)
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
val foo = ""<caret>!!
@@ -1,5 +1,4 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for object <anonymous>" "false"
// ACTION: Remove unnecessary non-null assertion (!!)
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
fun foo() {
object : Base(""<caret>!!) {
@@ -1,8 +1,4 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for object <anonymous>" "false"
// ACTION: Disable 'Split Property Declaration'
// ACTION: Edit intention settings
// ACTION: Remove unnecessary non-null assertion (!!)
// ACTION: Split property declaration
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
fun foo() {
val a = object : Base(""<caret>!!) {
@@ -1,5 +1,4 @@
// "Suppress 'REDUNDANT_NULLABLE' for statement " "false"
// ACTION: Remove redundant '?'
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
open class Base<T>
class Child: Base<String?<caret>?>()