RFR: 8377244: Update ModuleReaderTest to JUnit prior to making changes
David Beaumont
duke at openjdk.org
Thu Feb 5 14:48:15 UTC 2026
On Thu, 5 Feb 2026 14:39:51 GMT, David Beaumont <duke at openjdk.org> wrote:
> Updated legacy TestNG asserts to JUnit and added useful context to help debugging when assertions fail.
test/jdk/java/lang/module/ModuleReader/ModuleReaderTest.java line 192:
> 190: ouri.ifPresent(uri -> {
> 191: if (name.endsWith("/"))
> 192: assertTrue(uri.toString().endsWith("/"),
The assertions here are basically duplicated further down too.
They are, to all intents and purposes identical, and could be factored out if desired.
test/jdk/java/lang/module/ModuleReader/ModuleReaderTest.java line 214:
> 212: assertThrows(IOException.class, () -> reader.open(BASE_RESOURCES[0]));
> 213: assertThrows(IOException.class, () -> reader.read(BASE_RESOURCES[0]));
> 214: assertThrows(IOException.class, reader::list);
Added seemingly missing case (present below, but not in this version).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29588#discussion_r2769547202
PR Review Comment: https://git.openjdk.org/jdk/pull/29588#discussion_r2769540083
More information about the core-libs-dev
mailing list