Skip to content

Commit ada5a8d

Browse files
Merge pull request #51 from olcaytaner/feature/sort-test-cases-by-length
Sort test cases by input length for easier debugging
2 parents 93a4c52 + 25691a5 commit ada5a8d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/common/TestFileParser.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.io.FileReader;
55
import java.io.IOException;
66
import java.util.ArrayList;
7+
import java.util.Comparator;
78
import java.util.List;
89

910
/**
@@ -219,6 +220,8 @@ public static TestFileResult parseTestFile(String filePath) throws IOException {
219220
}
220221
}
221222

223+
testCases.sort(Comparator.comparingInt(tc -> tc.getInput().length()));
224+
222225
return new TestFileResult(testCases, minPoints, maxPoints, maxRegexLength, timeout, maxRules, maxTransitions);
223226
}
224227
}

0 commit comments

Comments
 (0)