Tests: improved output to show verify errors at the end (after warnings);

This commit is contained in:
Oleg Agafonov 2021-01-23 07:28:01 +04:00
parent 05f8311364
commit abc36ba607

View file

@ -765,7 +765,19 @@ public class VerifyCardDataTest {
ArrayList<String> sortedList = new ArrayList<>(list);
if (sorted) {
sortedList.sort(String::compareTo);
sortedList.sort(new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
// show errors in the end of the list (after warnings, near the final assert fail)
boolean e1 = o1.toLowerCase(Locale.ENGLISH).startsWith("error");
boolean e2 = o2.toLowerCase(Locale.ENGLISH).startsWith("error");
if (e1 != e2) {
return Boolean.compare(e1, e2);
} else {
return o1.compareTo(o2);
}
}
});
}
for (String mes : sortedList) {