|
11 | 11 | import java.util.Arrays; |
12 | 12 | import java.util.Comparator; |
13 | 13 | import java.util.List; |
14 | | -import java.util.stream.Collectors; |
15 | 14 | import java.util.stream.Stream; |
16 | 15 | import org.scip_code.scip.Document; |
17 | 16 | import org.scip_code.scip.Index; |
@@ -115,35 +114,19 @@ public void onTargetroot( |
115 | 114 | * target-root (as {@code -Dsnapshot.case.<id>.targetroot}) and the source root, which are |
116 | 115 | * build-time paths. |
117 | 116 | */ |
118 | | - private static final List<CaseSpec> CASE_SPECS = |
119 | | - Arrays.asList( |
120 | | - new CaseSpec("java-common", "scip-snapshots/expected/java/common", false), |
121 | | - new CaseSpec("kotlin-common", "scip-snapshots/expected/kotlin/common", true)); |
122 | | - |
123 | | - private static final class CaseSpec { |
124 | | - final String id; |
125 | | - final String relativeExpectDirectory; |
126 | | - final boolean aggregateNoEmitInverseRelationships; |
127 | | - |
128 | | - CaseSpec( |
129 | | - String id, String relativeExpectDirectory, boolean aggregateNoEmitInverseRelationships) { |
130 | | - this.id = id; |
131 | | - this.relativeExpectDirectory = relativeExpectDirectory; |
132 | | - this.aggregateNoEmitInverseRelationships = aggregateNoEmitInverseRelationships; |
133 | | - } |
134 | | - } |
135 | | - |
136 | 117 | public static List<SnapshotCase> snapshotCases() { |
137 | 118 | Path sourceroot = requiredPathProperty("snapshot.sourceroot"); |
138 | | - return CASE_SPECS.stream() |
139 | | - .map( |
140 | | - spec -> |
141 | | - new SnapshotCase( |
142 | | - spec.id, |
143 | | - sourceroot.resolve(spec.relativeExpectDirectory), |
144 | | - requiredPathProperty("snapshot.case." + spec.id + ".targetroot"), |
145 | | - spec.aggregateNoEmitInverseRelationships)) |
146 | | - .collect(Collectors.toList()); |
| 119 | + return Arrays.asList( |
| 120 | + new SnapshotCase( |
| 121 | + "java-common", |
| 122 | + sourceroot.resolve("scip-snapshots/expected/java/common"), |
| 123 | + requiredPathProperty("snapshot.case.java-common.targetroot"), |
| 124 | + false), |
| 125 | + new SnapshotCase( |
| 126 | + "kotlin-common", |
| 127 | + sourceroot.resolve("scip-snapshots/expected/kotlin/common"), |
| 128 | + requiredPathProperty("snapshot.case.kotlin-common.targetroot"), |
| 129 | + true)); |
147 | 130 | } |
148 | 131 |
|
149 | 132 | public static Path requiredPathProperty(String name) { |
|
0 commit comments