On Wed, 21 Jan 2026 19:59:14 GMT, Johannes Döbler <[email protected]> wrote:
>> This PR converts the tests under `test/jdk/java/lang/runtime/` to use JUnit. >> Mostly converted by the automatic conversion tool, but there's a manual >> tweak to use `assertThrows` instead of the current manual `try-catch`. Also >> one manual fix. The changes are in separate commits, which should help >> reviewing. >> >> Thanks! > > test/jdk/java/lang/runtime/SwitchBootstrapsTest.java line 161: > >> 159: testEnum(E1.B, 1, 3, "B", "C", "A", E1.class); >> 160: assertThrows(IllegalArgumentException.class, () -> >> 161: testEnum(E1.B, 0, -1, E2.class) > > for readability it could be worth to add a helper method > `testEnumError(Class<? extends RuntimeException> exceptionClass, Enum<?> > target, int start, int result, Object... labels)` The `start` and `result` arguments here are completely unused. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29350#discussion_r2714149186
