[jdk17] RFR: 8269656: The test test/langtools/tools/javac/versions/Versions.java has duplicate test cycles

Thejasvi Voniadka tvoniadka at openjdk.java.net
Wed Jun 30 08:29:17 UTC 2021


The test "test test/langtools/tools/javac/versions/Versions.java" duplicates some operations, while missing some others.

>From the execution log:

...
test: check_source_target 52.0 8 8
...
test: check_source_target 52.0 8 8
...
test: check_source_target 53.0 9 9
...
test: check_source_target 53.0 9 9
...


We can notice the duplicates. Also some combinations are missed out. For example, "check -source 7 -target 8" is an expected combination in the output, but it is missed.

I have updated the index boundaries of the inner for-loop to address this discrepancy.

In addition, the test code contains an unreachable block of code, that causes the combination "most recent target" without a "-source" specifier to be missed out. I have updated the corresponding "if" condition too.

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

Commit messages:
 - 8269656: The test test/langtools/tools/javac/versions/Versions.java has duplicate test cycles

Changes: https://git.openjdk.java.net/jdk17/pull/179/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=179&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8269656
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/179.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/179/head:pull/179

PR: https://git.openjdk.java.net/jdk17/pull/179


More information about the compiler-dev mailing list