RFR: 8310049: Refactor Charset tests to use JUnit

Lance Andersen lancea at openjdk.org
Thu Jun 15 19:58:11 UTC 2023


On Thu, 15 Jun 2023 19:42:56 GMT, Justin Lu <jlu at openjdk.org> wrote:

> As discussed in https://github.com/openjdk/jdk/pull/14473/files, tests within _test/jdk/java/nio/charset/Charset_ could benefit from using a test framework such as JUnit. 
> 
> In addition, this PR groups the emptyCharset, nullCharset, and defaultCharset tests into _illegalCharsets.java_. The _default.java_ file was removed, as it did not test anything.

Thanks for starting this migration/refactor.

I would use this as an opportunity to add additional comments introducing the tests and the relevant parameterized lists et al

test/jdk/java/nio/charset/Charset/AvailableCharsetNames.java line 25:

> 23: 
> 24: /* @test
> 25:  * @bug 4422044 8310049

As this is just a refactor, I don't think you need the bug number for converting to junit

-------------

PR Review: https://git.openjdk.org/jdk/pull/14500#pullrequestreview-1482287594
PR Review Comment: https://git.openjdk.org/jdk/pull/14500#discussion_r1231472262


More information about the nio-dev mailing list