Fix tests
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 7m41s

This commit is contained in:
Daniel Holle 2024-09-26 11:31:24 +02:00
parent 9ede47c2d6
commit b7979ac7e7
3 changed files with 2 additions and 3 deletions

View File

@ -12,7 +12,6 @@ public class GenericRecordSwitchCase {
return switch(o) {
case LinkedElem(a, Elem(e)) -> a ;
case LinkedElem(a, LinkedElem(e, Elem(f))) -> a;
default -> null;
};
}
}

View File

@ -10,7 +10,7 @@ public class SwitchAppend {
case LinkedElem(a, r) -> new LinkedElem<>(a, append(r, l2));
//Alternativ:
//case LinkedElem(a, LinkedElem(e, r)) -> new LinkedElem<>(a, append(new LinkedElem(e, r), l2));
default -> null;
//default -> null;
};
}
}

View File

@ -784,11 +784,11 @@ public class TestComplete {
var clazz = classFiles.get("GenericRecordSwitchCase");
var instance = clazz.getDeclaredConstructor().newInstance();
var swtch = clazz.getDeclaredMethod("main", Object.class);
var linkedElem = classFiles.get("LinkedElem");
var listInterface = classFiles.get("List");
var elem = classFiles.get("Elem");
var swtch = clazz.getDeclaredMethod("main", linkedElem);
var constructorLinkedElem = linkedElem.getConstructor(Object.class, listInterface);