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
}