ParameterizedTest to enable passing in a range of
JavacJctCompilerImpl instances with specific configured versions as the first
parameter.
This will also add the "java-compiler-testing-test" tag and "javac-test"
tags to your test method, meaning you can instruct your IDE or build system to optionally only
run tests annotated with this method for development purposes. As an example, Maven Surefire
could be instructed to only run these tests by passing -Dgroup="javac-test" to Maven.
If your build is running in a GraalVM Native Image, then this test will not execute, as the Java Compiler Testing API is not yet tested within Native Images.
- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends JctCompilerConfigurer<?>>[]Get an array of compiler configurers to apply in-order before starting the test.intMaximum version to use (inclusive).intMinimum version to use (inclusive).booleanWhether we need to support modules or not.The version strategy to use.
-
Element Details
-
minVersion
int minVersionMinimum version to use (inclusive).- Returns:
- the minimum version.
- Default:
- -2147483648
-
maxVersion
int maxVersionMaximum version to use (inclusive).- Returns:
- the maximum version.
- Default:
- 2147483647
-
configurers
Class<? extends JctCompilerConfigurer<?>>[] configurersGet an array of compiler configurers to apply in-order before starting the test.Each configurer must have a public no-args constructor, and their package must be open to this module if JPMS modules are in-use.
- Returns:
- an array of classes to run to configure the compiler. These run in the given order.
- Default:
- {}
-
modules
boolean modulesWhether we need to support modules or not.Setting this to true will skip any versions of the compiler that do not support JPMS modules.
- Returns:
trueif we need to support modules, orfalseif we do not.
- Default:
- false
-
versionStrategy
The version strategy to use.This determines whether the version number being iterated across specifies the release, source, target, or source and target versions.
The default is to specify the release.
- Returns:
- the version strategy to use.
- Default:
- RELEASE
-