public class ImmutableTestConfiguration extends Object implements TestConfiguration
| Constructor and Description |
|---|
ImmutableTestConfiguration(List<File> diagnosticFiles,
List<File> testSourceFiles,
List<String> processors,
Map<String,String> options,
boolean shouldEmitDebugInfo)
Create a new ImmutableTestConfiguration.
|
| Modifier and Type | Method and Description |
|---|---|
List<File> |
getDiagnosticFiles()
Diagnostic files consist of a set of lines that enumerate expected error/warning diagnostics.
|
List<String> |
getFlatOptions()
Returns the map returned by
TestConfiguration.getOptions(), flattened into a list. |
Map<String,String> |
getOptions()
Some Javac command line arguments require arguments themselves (e.g.
|
List<String> |
getProcessors()
Returns a list of annotation processors (Checkers) passed to the Javac compiler.
|
List<File> |
getTestSourceFiles()
Returns a list of source files a CheckerFrameworkPerDirectoryTest should be run over.
|
boolean |
shouldEmitDebugInfo()
Returns true if the TypecheckExecutor should emit debug information on system out, false
otherwise.
|
String |
toString() |
public ImmutableTestConfiguration(List<File> diagnosticFiles, List<File> testSourceFiles, List<String> processors, Map<String,String> options, boolean shouldEmitDebugInfo)
diagnosticFiles - files containing diagnostics that should be returned by javactestSourceFiles - the source files to compileprocessors - the annotation processors (usually checkers) to runoptions - options that should be passed to the compilershouldEmitDebugInfo - the value of system property "emit.test.debug"public List<File> getTestSourceFiles()
TestConfigurationgetTestSourceFiles in interface TestConfigurationpublic List<File> getDiagnosticFiles()
TestConfigurationfileName:lineNumber: diagnostKind: (messageKey)e.g.,
MethodInvocation.java:17: error: (method.invocation)If getDiagnosticFiles does NOT return an empty list, then the only diagnostics expected by the TestExecutor will be the ones found in these files. If it does return an empty list, then the only diagnostics expected will be the ones found in comments in the input test files.
It is preferred that users write the errors in the test files and not in diagnostic files.
getDiagnosticFiles in interface TestConfigurationpublic List<String> getProcessors()
TestConfigurationgetProcessors in interface TestConfigurationpublic Map<String,String> getOptions()
TestConfiguration-classpath takes a
path) getOptions returns a Map(optionName => optionArgumentIfAny). If an option does
not take an argument, pass null as the value.
E.g.,
Map(
"-AprintAllQualifiers" => null
"-classpath" => "myDir1:myDir2"
)
getOptions in interface TestConfigurationpublic List<String> getFlatOptions()
TestConfigurationTestConfiguration.getOptions(), flattened into a list. The entries will be
added as followed: List(key1, value1, key2, value2, ..., keyN, valueN). If a value is NULL,
then it will not appear in the list.getFlatOptions in interface TestConfigurationTestConfiguration.getOptions(), but flattened into a listpublic boolean shouldEmitDebugInfo()
TestConfigurationshouldEmitDebugInfo in interface TestConfiguration