RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v6]

Eirik Bjorsnos duke at openjdk.org
Fri Mar 31 19:59:10 UTC 2023


> 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

Eirik Bjorsnos has updated the pull request incrementally with four additional commits since the last revision:

 - Remove the "Validate that " comment prefix
 - Spell immediately correctly
 - a A -> a
 - this -> the

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/12563/files
  - new: https://git.openjdk.org/jdk/pull/12563/files/e32052f1..3b6d8577

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=12563&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12563&range=04-05

  Stats: 16 lines in 1 file changed: 0 ins; 0 del; 16 mod
  Patch: https://git.openjdk.org/jdk/pull/12563.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/12563/head:pull/12563

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


More information about the core-libs-dev mailing list