Groupped tests by folders
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.forEachIndexed{}'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.forEachIndexed{}'"
|
||||
fun foo(list: List<String>) {
|
||||
<caret>for ((index, s) in list.withIndex()) {
|
||||
val s1 = s.substring(1)
|
||||
println(s1.hashCode() * index)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.forEachIndexed{}'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.forEachIndexed{}'"
|
||||
fun foo(list: List<String>) {
|
||||
list
|
||||
.map { it.substring(1) }
|
||||
.forEachIndexed { index, s1 -> println(s1.hashCode() * index) }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'map{}.forEachIndexed{}'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.forEachIndexed{}'"
|
||||
fun foo(list: List<String>) {
|
||||
list
|
||||
.asSequence()
|
||||
.map { it.substring(1) }
|
||||
.forEachIndexed { index, s1 -> println(s1.hashCode() * index) }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
// IS_APPLICABLE_2: false
|
||||
fun foo(list: List<String>) {
|
||||
<caret>for ((index, s) in list.withIndex()) {
|
||||
println(s.hashCode() * index)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
// IS_APPLICABLE_2: false
|
||||
fun foo(list: List<String>) {
|
||||
<caret>for (s in list) {
|
||||
println(s)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'mapIndexed{}.forEach{}'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().mapIndexed{}.forEach{}'"
|
||||
fun foo(list: List<String>) {
|
||||
<caret>for ((index, s) in list.withIndex()) {
|
||||
val x = s.length * index
|
||||
println(x)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'mapIndexed{}.forEach{}'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().mapIndexed{}.forEach{}'"
|
||||
fun foo(list: List<String>) {
|
||||
list
|
||||
.mapIndexed { index, s -> s.length * index }
|
||||
.forEach { println(it) }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'mapIndexed{}.forEach{}'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().mapIndexed{}.forEach{}'"
|
||||
fun foo(list: List<String>) {
|
||||
list
|
||||
.asSequence()
|
||||
.mapIndexed { index, s -> s.length * index }
|
||||
.forEach { println(it) }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'filter{}.forEach{}'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.forEach{}'"
|
||||
fun foo(list: List<String>) {
|
||||
<caret>for (s in list) {
|
||||
if (s.isNotBlank()) {
|
||||
println(s)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'filter{}.forEach{}'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.forEach{}'"
|
||||
fun foo(list: List<String>) {
|
||||
list
|
||||
.filter { it.isNotBlank() }
|
||||
.forEach { println(it) }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'filter{}.forEach{}'"
|
||||
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.forEach{}'"
|
||||
fun foo(list: List<String>) {
|
||||
list
|
||||
.asSequence()
|
||||
.filter { it.isNotBlank() }
|
||||
.forEach { println(it) }
|
||||
}
|
||||
Reference in New Issue
Block a user