testing the -target option
Joseph D. Darcy
joe.darcy at oracle.com
Mon Oct 28 19:00:09 UTC 2024
On 10/28/2024 8:49 AM, Alan Snyder wrote:
> I’m curious to know how the javac -target option is tested. I can think of several possibilities, but am wondering what actually is done.
You can satisfy your curiosity by looking the the javac regressions
tests in the OpenJDK repo. Under
https://github.com/openjdk/jdk
see the test/langtools/tools/javac directory hierarchy.
>
> (I did not find any discussion of this issue in the online project docs.)
>
> A few questions:
>
> * Is javac -target required to generate the same byte code as the target javac?
No.
>
> * Is javac -target required to generate the same error messages as the target javac?
No.
>
> * Are there negative tests to verify that language features introduced in later releases are rejected?
Yes.
> * How frequently are the tests typically run?
All the time. The javac tests are part of the "tier 1" tests of OpenJDK
and are run by the CI systems for (effectively) every push.
-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20241028/51606052/attachment.htm>
More information about the compiler-dev
mailing list