Skip to content

Commit

Permalink
i_966 Check if both times for a problem are non-zero
Browse files Browse the repository at this point in the history
It's possible that one CCS just puts zeroes in for the time.  Previously only checked if shadow had 0 times, now we check for both primary and shadow.
  • Loading branch information
johnbrvc committed Aug 24, 2024
1 parent 9533f59 commit d640123
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/edu/csus/ecs/pc2/core/report/FileComparisonUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public static FileComparison createScoreboardJSONFileComparison(String jsonFilen
List<ProblemScoreRow> probs2 = secondScoreRow.getProblems();
if(probs1 != null && probs2 != null) {
ProblemScoreRow p1, p2;
int ptime;
int ptime1, ptime2;
String probString, probId;
boolean foundProblem;

Expand Down Expand Up @@ -190,11 +190,12 @@ public static FileComparison createScoreboardJSONFileComparison(String jsonFilen
fileComparison.addfieldCompareRecord(fieldCompareRecord);

// only matters, really, if solved is true, however, we will compare it to catch errors in implementations
ptime = p1.getTime();
if(ptime != 0 || !IGNORE_ZERO_SOLVE_TIMES) {
ptime1 = p1.getTime();
ptime2 = p2.getTime();
if((ptime1 != 0 && ptime2 != 0) || !IGNORE_ZERO_SOLVE_TIMES) {
fieldName = "time";
valueOne = Integer.toString(ptime);
valueTwo = Integer.toString(p2.getTime());
valueOne = Integer.toString(ptime1);
valueTwo = Integer.toString(ptime2);
fieldCompareRecord = new FieldCompareRecord(fieldName, valueOne, valueTwo, null, probString);
fileComparison.addfieldCompareRecord(fieldCompareRecord);
}
Expand Down

0 comments on commit d640123

Please sign in to comment.