Class ImmutableTestConfiguration
java.lang.Object
org.checkerframework.framework.test.ImmutableTestConfiguration
- All Implemented Interfaces:
- TestConfiguration
Represents all of the information needed to execute the Javac compiler for a given set of test
 files.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionDiagnostic files consist of a set of lines that enumerate expected error/warning diagnostics.Returns the map returned byTestConfiguration.getOptions(), flattened into a list.Some Javac command line arguments require arguments themselves (e.g.Returns a list of annotation processors (Checkers) passed to the Javac compiler.Returns a list of source files a CheckerFrameworkPerDirectoryTest should be run over.booleanReturns true if the TypecheckExecutor should emit debug information on system out, false otherwise.toString()
- 
Constructor Details- 
ImmutableTestConfigurationpublic ImmutableTestConfiguration(List<File> diagnosticFiles, List<File> testSourceFiles, List<@BinaryName String> processors, Map<String, @Nullable String> options, boolean shouldEmitDebugInfo) Create a new ImmutableTestConfiguration.- Parameters:
- diagnosticFiles- files containing diagnostics that should be returned by javac
- testSourceFiles- the source files to compile
- processors- the annotation processors (usually checkers) to run
- options- options that should be passed to the compiler
- shouldEmitDebugInfo- the value of system property "emit.test.debug"
 
 
- 
- 
Method Details- 
getTestSourceFilesDescription copied from interface:TestConfigurationReturns a list of source files a CheckerFrameworkPerDirectoryTest should be run over. These source files will be passed to Javac when the test is run. These are NOT JUnit tests.- Specified by:
- getTestSourceFilesin interface- TestConfiguration
- Returns:
- a list of source files a CheckerFrameworkPerDirectoryTest should be run over
 
- 
getDiagnosticFilesDescription copied from interface:TestConfigurationDiagnostic files consist of a set of lines that enumerate expected error/warning diagnostics. The lines are of the form:fileName: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. - Specified by:
- getDiagnosticFilesin interface- TestConfiguration
- Returns:
- a List of diagnostic files containing the error/warning messages expected to be output when Javac is run on the files returned by getTestSourceFiles. Return an empty list if these messages were specified within the source files.
 
- 
getProcessorsDescription copied from interface:TestConfigurationReturns a list of annotation processors (Checkers) passed to the Javac compiler.- Specified by:
- getProcessorsin interface- TestConfiguration
- Returns:
- a list of annotation processors (Checkers) passed to the Javac compiler
 
- 
getOptionsDescription copied from interface:TestConfigurationSome Javac command line arguments require arguments themselves (e.g.-classpathtakes a path) getOptions returns aMap(optionName => optionArgumentIfAny). If an option does not take an argument, pass null as the value.E.g., Map( "-AprintAllQualifiers" => null "-classpath" => "myDir1:myDir2" )- Specified by:
- getOptionsin interface- TestConfiguration
- Returns:
- a Map representing all command-line options to Javac other than source files and processors
 
- 
getFlatOptionsDescription copied from interface:TestConfigurationReturns the map returned byTestConfiguration.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.- Specified by:
- getFlatOptionsin interface- TestConfiguration
- Returns:
- the map returned TestConfiguration.getOptions(), but flattened into a list
 
- 
shouldEmitDebugInfopublic boolean shouldEmitDebugInfo()Description copied from interface:TestConfigurationReturns true if the TypecheckExecutor should emit debug information on system out, false otherwise.- Specified by:
- shouldEmitDebugInfoin interface- TestConfiguration
- Returns:
- true if the TypecheckExecutor should emit debug information on system out, false otherwise
 
- 
toString
 
-