mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Tests: improved output to show verify errors at the end (after warnings);
This commit is contained in:
parent
05f8311364
commit
abc36ba607
1 changed files with 13 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue