Skip to content

Commit

Permalink
assemble
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jul 22, 2024
1 parent c8bf62b commit 65c1ee3
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,15 @@ private static Object extractTestStep(
}

private static ForkChoiceTestStep getStepKind(final Map<String, Object> ss) {
return ss.keySet().stream()
.map(ForkChoiceTestStep::valueOf)
.collect(Collectors.toList())
.get(0);
return ss.keySet().stream().map(ForkChoiceTestStep::valueOf).toList().get(0);
}

private static <T extends SszData> T resolvePart(
final Class<T> clazz,
final SszSchema<? extends T> type,
final File testFile,
final Object value) {
if (value instanceof String) {
String path = (String) value;
if (value instanceof String path) {
if (path.endsWith(".yaml") || path.endsWith(".ssz")) {
Path partPath = Paths.get(testFile.getParentFile().getParent(), "cache", path);
try {
Expand Down Expand Up @@ -225,9 +221,9 @@ void runForkChoiceTests(
if (!processAttestation(forkChoice, (Attestation) step)) {
attestationBuffer.add((Attestation) step);
}
} else if (step instanceof Map) {
} else if (step instanceof Map<?, ?> rawChecks) {
@SuppressWarnings("unchecked")
Map<String, Object> checks = (Map<String, Object>) step;
Map<String, Object> checks = (Map<String, Object>) rawChecks;
for (Map.Entry<String, Object> e : checks.entrySet()) {
String check = e.getKey();
switch (check) {
Expand Down

0 comments on commit 65c1ee3

Please sign in to comment.