check mode in tx test cases

This commit is contained in:
Grahame Grieve 2024-10-22 17:16:27 +10:30
parent 9dc08c213c
commit c9c04aec3b
1 changed files with 6 additions and 4 deletions

View File

@ -180,10 +180,12 @@ public class TxTester {
List<Resource> setup = loadSetupResources(suite); List<Resource> setup = loadSetupResources(suite);
boolean ok = true; boolean ok = true;
for (JsonObject test : suite.getJsonObjects("tests")) { for (JsonObject test : suite.getJsonObjects("tests")) {
if (test.asBoolean("disabled")) { if ((!test.has("mode") || modes.contains(test.asString("mode")))) {
ok = true; if (test.asBoolean("disabled")) {
} else { ok = true;
ok = runTest(test, tx, setup, modes, filter, outputS.forceArray("tests")) && ok; } else {
ok = runTest(test, tx, setup, modes, filter, outputS.forceArray("tests")) && ok;
}
} }
} }
return ok; return ok;