support min/max in stream api migration, rearrange tests

This commit is contained in:
Roman Ivanov
2017-08-02 12:57:45 +07:00
parent dd4ba58889
commit 72bab18a58
561 changed files with 2091 additions and 17 deletions
@@ -0,0 +1,12 @@
// "Replace with collect" "true"
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class Test {
public static void test(List<String> data) {
List<String> result = data.stream().takeWhile(s -> !s.isEmpty()).collect(Collectors.toList());
System.out.println(result);
}
}
@@ -0,0 +1,17 @@
// "Replace with collect" "false"
import java.util.ArrayList;
import java.util.List;
public class Test {
public static void test(List<String> data) {
List<String> result = new ArrayList<>();
for(String s : da<caret>ta) {
if(s.isEmpty()) {
break;
}
result.add(s);
}
System.out.println(result);
}
}
@@ -0,0 +1,17 @@
// "Replace with collect" "true"
import java.util.ArrayList;
import java.util.List;
public class Test {
public static void test(List<String> data) {
List<String> result = new ArrayList<>();
for(String s : da<caret>ta) {
if(s.isEmpty()) {
break;
}
result.add(s);
}
System.out.println(result);
}
}