Skip to content

Commit

Permalink
Fix an ex2 call, add error checking to CalloutVerificationTest
Browse files Browse the repository at this point in the history
  • Loading branch information
xpdota committed Sep 10, 2024
1 parent 52be751 commit 34685ff
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,13 @@ public int getOrder() {
last = actualCall;
}
}
if (failOnCalloutErrors()) {
for (CalloutInitialValues actualCall : actualCalls) {
if (actualCall.tts().contains("Error") || actualCall.text().contains("Error")) {
assortedFailures.add("Call [%s, %s] had an error".formatted(actualCall.tts(), actualCall.text()));
}
}
}
if (!assortedFailures.isEmpty()) {
throw new AssertionError("Issues with callouts which were too close to one another:\n" + String.join("\n", assortedFailures));
}
Expand All @@ -291,6 +298,10 @@ protected List<AmVerificationValues> getExpectedAms() {
return List.of();
}

protected boolean failOnCalloutErrors() {
return true;
}

private static <X extends HasEvent> void compareLists(RawEventStorage rawStorage, List<X> actual, List<X> expected) {
if (actual.isEmpty()) {
throw new RuntimeException("Actual list was empty!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,18 @@ Half Circuit is a half (west or east) cleave with either an in or out
}
if (rightSafe) {
if (out) {
s.updateCall(halfCircuitRightOut);
s.updateCall(halfCircuitRightOut, e1);
}
else {
s.updateCall(halfCircuitRightIn);
s.updateCall(halfCircuitRightIn, e1);
}
}
else {
if (out) {
s.updateCall(halfCircuitLeftOut);
s.updateCall(halfCircuitLeftOut, e1);
}
else {
s.updateCall(halfCircuitLeftIn);
s.updateCall(halfCircuitLeftIn, e1);
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected List<CalloutInitialValues> getExpectedCalls() {
call(371183, "Break Chains (with Gamama Gama)", "Break Chains (with Gamama Gama) (15.0)"),
call(386373, "Raidwide", "Raidwide (4.7)"),
call(399689, "Avoid Balls, Follow Donuts", "Avoid Balls, Follow Donuts (4.7)"),
call(419754, "Left/West and Out", "Left/West and Out (Error)"),
call(419754, "Left/West and Out", "Left/West and Out (6.7)"),
call(434911, "Tank Tethers", "Tank Tethers (7.7)"),
call(450126, "Take Stacks Sequentially", "Take Stacks Sequentially (4.7)"),
call(471892, "Left/West", "Left/West (6.8)"),
Expand Down

0 comments on commit 34685ff

Please sign in to comment.