Skip to content

Commit

Permalink
Throw exception when testsuite does not support skipping tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schuessf committed Aug 20, 2024
1 parent 895ac12 commit aba9b93
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ protected Collection<File> getInputFiles(final Predicate<File> regexFilter, fina
protected abstract ITestResultDecider getTestResultDecider(UltimateRunDefinition runDefinition,
String overridenExpectedVerdict);

protected void checkNoOverridenVerdict(final String overridenExpectedVerdict) {
if (overridenExpectedVerdict != null) {
throw new UnsupportedOperationException(getClass().getSimpleName() + " does not support skipping tests.");
}
}

public static final class Config
extends de.uni_freiburg.informatik.ultimate.util.datastructures.relation.Pair<File, File> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public BoogieBacktranslationRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new BacktranslationTestResultDecider(runDefinition);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public CBacktranslationRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new BacktranslationTestResultDecider(runDefinition);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public AbsIntRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new OverapproximatingSafetyCheckTestResultDecider(runDefinition, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public AutomataLibraryRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new AutomataScriptTestResultDecider();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ public ChcRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
boolean unknownIsSuccess = false;
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
final boolean unknownIsSuccess = false;
return new ChcTestResultDecider(runDefinition, unknownIsSuccess);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public DataRaceRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new SafetyCheckTestResultDecider(runDefinition, false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public LTLRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new LTLCheckerTestResultDecider(runDefinition, false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public MSODRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
final boolean unknownIsSuccess = true;
return new MSODTestResultDecider(runDefinition, unknownIsSuccess);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public ReqCheckerRedundancyRegressionTestSuite() {
@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new ReqCheckerTestResultDecider(runDefinition, false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ public ReqCheckerRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new ReqCheckerTestResultDecider(runDefinition, false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public TerminationRegressionTestSuite() {
}

@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition, String overridenExpectedVerdict) {
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new TerminationAnalysisTestResultDecider(runDefinition, false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public WitnessRegressionTestSuite() {
@Override
protected ITestResultDecider getTestResultDecider(final UltimateRunDefinition runDefinition,
final String overridenExpectedVerdict) {
checkNoOverridenVerdict(overridenExpectedVerdict);
return new WitnessSafetyCheckTestResultDecider(runDefinition);
}

Expand Down

0 comments on commit aba9b93

Please sign in to comment.