blob: b1818a1774d94d4d220709fee3892f3fcdf6525b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package tools.refinery.store.query.viatra.tests;
import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
/**
* Overrides {@link QueryEvaluationHint#toString()} for pretty names in parametric test names.
*/
class QueryBackendHint extends QueryEvaluationHint {
public QueryBackendHint(BackendRequirement backendRequirementType) {
super(null, backendRequirementType);
}
@Override
public String toString() {
return switch (getQueryBackendRequirementType()) {
case UNSPECIFIED -> "default";
case DEFAULT_CACHING -> "incremental";
case DEFAULT_SEARCH -> "localSearch";
default -> throw new IllegalStateException("Unknown BackendRequirement");
};
}
}
|