RFR: JDK-8296968: Update langtools tests to use @enablePreview [v2]
Jonathan Gibbons
jjg at openjdk.org
Tue Nov 15 20:54:06 UTC 2022
On Tue, 15 Nov 2022 20:14:41 GMT, Joe Darcy <darcy at openjdk.org> wrote:
>> Update langtools tests to use JTreg's @enablePreview tag, where appropriate.
>
> Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - Update copyrights.
> - Remove unnecessary run tags.
> - Merge branch 'master' into JDK-8296968
> - JDK-8296968: Update langtools tests to use @enablePreview
In various places `/othervm` has been left in place, but not clear why.
In one place, whitespace was fixed, but `@enablePreview` was not added
test/langtools/tools/javac/annotations/typeAnnotations/classfile/Patterns.java line 32:
> 30: * @build toolbox.JavapTask
> 31: * @enablePreview
> 32: * @run main/othervm Patterns
do we still need `/othervm` ?
test/langtools/tools/javac/patterns/EnumTypeChanges.java line 31:
> 29: * @compile EnumTypeChanges.java
> 30: * @compile EnumTypeChanges2.java
> 31: * @run main/othervm EnumTypeChanges
Do we need `/othervm` ?
test/langtools/tools/javac/patterns/PatternErrorRecovery.java line 5:
> 3: * @bug 8268320
> 4: * @summary Verify user-friendly errors are reported for ill-formed pattern.
> 5: * @compile/fail/ref=PatternErrorRecovery.out -XDrawDiagnostics -XDshould-stop.at=FLOW --enable-preview -source ${jdk.version} PatternErrorRecovery.java
why no `@enablePreview` for this test?
test/langtools/tools/javac/patterns/SealedTypeChanges.java line 31:
> 29: * @compile SealedTypeChanges.java
> 30: * @compile SealedTypeChanges2.java
> 31: * @run main/othervm SealedTypeChanges
`/othervm` ?
test/langtools/tools/javac/patterns/SimpleAndGuardPattern.java line 28:
> 26: * @enablePreview
> 27: * @compile -doe SimpleAndGuardPattern.java
> 28: * @run main/othervm SimpleAndGuardPattern
`/othervm` ?
test/langtools/tools/javac/patterns/SwitchErrors.out line 58:
> 56: - compiler.note.preview.filename: SwitchErrors.java, DEFAULT
> 57: - compiler.note.preview.recompile
> 58: 55 errors
Interesting glyph for no trailing newline; I've not seen that before
-------------
PR: https://git.openjdk.org/jdk/pull/11149
More information about the compiler-dev
mailing list