Skip to content

Commit

Permalink
changed resolution check
Browse files Browse the repository at this point in the history
  • Loading branch information
rsehr committed Jan 23, 2025
1 parent 18351dd commit bf98a02
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public boolean check(Document doc) {
compressionValueY = resolutionYnum.intValue();
}
this.replaceMap.put("found", compressionValueX + "," + compressionValueY);
int expected = Integer.parseInt(expectedValue);

switch (checkType) {
case "equals": {
ValueRange range = ValueRangeFactory.create(expectedValue);
Expand All @@ -94,9 +94,11 @@ public boolean check(Document doc) {
case "same":
return compressionValueX.equals(compressionValueY);
case "greater":
int expected = Integer.parseInt(expectedValue);
return expected <= compressionValueX.intValue() && expected <= compressionValueY.intValue();
case "lesser":
return expected >= compressionValueX.intValue() && expected >= compressionValueY.intValue();
int expected2 = Integer.parseInt(expectedValue);
return expected2 >= compressionValueX.intValue() && expected2 >= compressionValueY.intValue();
default:
throw new IllegalArgumentException("Unexpected value: " + checkType);
}
Expand Down

0 comments on commit bf98a02

Please sign in to comment.