Added one more test

This commit is contained in:
Valentin Kipyatkov
2016-08-09 21:33:20 +03:00
parent e5903f90f2
commit 7c0f9a76a8
3 changed files with 27 additions and 0 deletions
@@ -0,0 +1,12 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'toMutableList()'"
import java.util.ArrayList
fun foo(map: Map<Int, String>): List<String> {
val result = ArrayList<String>()
<caret>for (s in map.values) {
result.add(s)
}
result.add("")
return result
}
@@ -0,0 +1,9 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'toMutableList()'"
import java.util.ArrayList
fun foo(map: Map<Int, String>): List<String> {
val result = map.values.toMutableList()
result.add("")
return result
}
@@ -7155,6 +7155,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
doTest(fileName);
}
@TestMetadata("addToCollection_addAfterLoop.kt")
public void testAddToCollection_addAfterLoop() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/addToCollection_addAfterLoop.kt");
doTest(fileName);
}
@TestMetadata("addToCollection_badReceiver1.kt")
public void testAddToCollection_badReceiver1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/addToCollection_badReceiver1.kt");