diff --git a/idea/testData/quickfix/addStarProjections/when/beforeUnqualifiedMapOneArg.kt b/idea/testData/quickfix/addStarProjections/when/beforeUnqualifiedMapOneArg.kt index 42b2681a5ff..c8f90c88840 100644 --- a/idea/testData/quickfix/addStarProjections/when/beforeUnqualifiedMapOneArg.kt +++ b/idea/testData/quickfix/addStarProjections/when/beforeUnqualifiedMapOneArg.kt @@ -1,6 +1,12 @@ // "Add '<*, *>'" "false" // "Add '<*>'" "false" // ERROR: 2 type arguments expected +// ACTION: Disable 'Eliminate Argument of 'when'' +// ACTION: Disable 'Replace 'when' with 'if'' +// ACTION: Edit intention settings +// ACTION: Edit intention settings +// ACTION: Eliminate argument of 'when' +// ACTION: Replace 'when' with 'if' public fun foo(a: Any) { when (a) { is Map -> {} diff --git a/idea/testData/quickfix/when/beforeTwoElseBranchesInWhen.kt b/idea/testData/quickfix/when/beforeTwoElseBranchesInWhen.kt index ddf036a0336..de076791f12 100644 --- a/idea/testData/quickfix/when/beforeTwoElseBranchesInWhen.kt +++ b/idea/testData/quickfix/when/beforeTwoElseBranchesInWhen.kt @@ -3,6 +3,9 @@ // ERROR: 'else' entry must be the last one in a when-expression // ERROR: Unreachable code // ERROR: Unreachable code +// ACTION: Disable 'Eliminate Argument of 'when'' +// ACTION: Edit intention settings +// ACTION: Eliminate argument of 'when' package foo fun foo() { diff --git a/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixActionsUtils.java b/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixActionsUtils.java index 4943d86c013..e51a122bf24 100644 --- a/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixActionsUtils.java +++ b/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixActionsUtils.java @@ -19,8 +19,8 @@ package org.jetbrains.jet.plugin.quickfix; import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.collect.Collections2; +import com.google.common.collect.Lists; import com.google.common.collect.Ordering; -import com.google.common.collect.Sets; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.testFramework.UsefulTestCase; import org.jetbrains.annotations.Nullable; @@ -73,16 +73,16 @@ public class QuickFixActionsUtils { public static void checkAvailableActionsAreExpected(JetFile file, Collection availableActions) { List validActions = Ordering.natural().sortedCopy( - Sets.newHashSet(InTextDirectivesUtils.findLinesWithPrefixesRemoved(file.getText(), "// ACTION:"))); + Lists.newArrayList(InTextDirectivesUtils.findLinesWithPrefixesRemoved(file.getText(), "// ACTION:"))); Collection actualActions = Ordering.natural().sortedCopy( - Collections2.transform(availableActions, new Function() { + Lists.newArrayList(Collections2.transform(availableActions, new Function() { @Override public String apply(@Nullable IntentionAction input) { assert input != null; return input.getText(); } - })); + }))); UsefulTestCase.assertOrderedEquals("Some unexpected actions available at current position: %s. Use // ACTION: directive", actualActions, validActions);