Fix tests
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 7m41s
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 7m41s
This commit is contained in:
parent
9ede47c2d6
commit
b7979ac7e7
@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user