RFR: JDK-8296968: Update langtools tests to use @enablePreview [v2]

Joe Darcy darcy at openjdk.org
Tue Nov 15 23:10:02 UTC 2022


On Tue, 15 Nov 2022 20:43:25 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> 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
>
> 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` ?

I suppose it isn't strictly required; I assume the @enablePreview functionality handles this if needed. I'll go through and remove the /othervm options and make sure the tests still pass, etc.

> 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?

The test has multiple @compile directives, one of which does not use --enable-preview. (I didn't check closely to see if enablePreview could be toggled on/off for different sets of directives.)

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

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


More information about the compiler-dev mailing list