blob: dc0e92c8220605a63bb0f45d3205ed929f982b67 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
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");
};
}
}
|