Integrated: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit

Eirik Bjorsnos duke at openjdk.org
Mon Apr 3 16:15:16 UTC 2023


On Tue, 14 Feb 2023 17:46:21 GMT, Eirik Bjorsnos <duke at openjdk.org> wrote:

> CorruptedZipFiles could benefit from some spring cleaning and a conversion to junit:
> 
> - The actual tests are moved into their own `@Test` methods, given more meaningful names and a Javadoc comment explaining the constraint being verified
> - The setup code is moved to a `@Before` method, slightly modernized and rewritten to take advantage of `assertEquals` 
> - `checkZipExceptionImpl` is updated to take advantage of `assertThrows`
> - A bunch of constants copied over from `ZipFile` can be deleted since JDK-6225935 has long been fixed

This pull request has now been integrated.

Changeset: 85e39744
Author:    Eirik Bjorsnos <eirbjo at gmail.com>
Committer: Lance Andersen <lancea at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/85e397447025484bde0fb8349d72075c14199be6
Stats:     392 lines in 1 file changed: 211 ins; 117 del; 64 mod

8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit

Reviewed-by: lancea

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

PR: https://git.openjdk.org/jdk/pull/12563


More information about the core-libs-dev mailing list