Class AinferValidatePerDirectoryTest
java.lang.Object
org.checkerframework.framework.test.CheckerFrameworkPerDirectoryTest
org.checkerframework.framework.test.CheckerFrameworkWPIPerDirectoryTest
org.checkerframework.framework.test.AinferValidatePerDirectoryTest
A specialized variant of 
CheckerFrameworkPerDirectoryTest for testing the Whole Program
 Inference feature of the Checker Framework, which is tested by running pairs of these tests: a
 "generation test" (of class AinferGeneratePerDirectoryTest) to do inference using the
 -Ainfer option, and a "validation test" (of this class) to check that files typecheck
 after those inferences are taken into account.- 
Field SummaryFields inherited from class org.checkerframework.framework.test.CheckerFrameworkPerDirectoryTestcheckerNames, checkerOptions, classpathExtra, testDir, testFiles
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAinferValidatePerDirectoryTest(List<File> testFiles, Class<? extends AbstractProcessor> checker, String checkerShortName, String testDir, Class<? extends AinferGeneratePerDirectoryTest> generationTest, String... checkerOptions) Creates a new checker test.
- 
Method SummaryModifier and TypeMethodDescriptionprotected static StringajavaArgFromFiles(List<File> sourceFiles, String checkerShortName) Computes the -Aajava argument that corresponds to the test files.protected static StringastubsArgFromFiles(List<File> sourceFiles, String checkerShortName) Computes the -Astubs argument that corresponds to the test files.voidrun()Methods inherited from class org.checkerframework.framework.test.CheckerFrameworkWPIPerDirectoryTestdoNotTypecheckMethods inherited from class org.checkerframework.framework.test.CheckerFrameworkPerDirectoryTestadjustTypecheckResult, customizeOptions
- 
Constructor Details- 
AinferValidatePerDirectoryTestprotected AinferValidatePerDirectoryTest(List<File> testFiles, Class<? extends AbstractProcessor> checker, String checkerShortName, String testDir, Class<? extends AinferGeneratePerDirectoryTest> generationTest, String... checkerOptions) Creates a new checker test. Use this constructor when creating a validation test.TestConfigurationBuilder.getDefaultConfigurationBuilder(String, File, String, Iterable, Iterable, List, boolean)adds additional checker options.- Parameters:
- testFiles- the files containing test code, which will be type-checked
- checker- the class for the checker to use
- checkerShortName- the short name of the checker, as used in the naming conventions for files, e.g. "index" for the Index Checker or "testchecker" for the AInferTestChecker
- testDir- the path to the directory of test inputs
- generationTest- the class of the test that must run before this test, if this is the second of a pair of tests
- checkerOptions- options to pass to the compiler when running tests
 
 
- 
- 
Method Details- 
ajavaArgFromFilesComputes the -Aajava argument that corresponds to the test files. This method is necessary because the framework issues a warning if a .ajava file with no corresponding source file is specified.Assumes that ajava files will be in the #getInferenceBaseDir(String)directory.- Parameters:
- sourceFiles- the list of source files
- checkerShortName- the short name of the checker, as used in the naming conventions for files, e.g. "index" for the Index Checker or "testchecker" for the AInferTestChecker
- Returns:
- the appropriate -Aajava argument
 
- 
astubsArgFromFilesComputes the -Astubs argument that corresponds to the test files. This method is necessary because the framework issues a warning if a .astub file with no corresponding source file is specified.Assumes that astub files will be in the #getInferenceBaseDir(String)directory.- Parameters:
- sourceFiles- the list of source files
- checkerShortName- the short name of the checker, as used in the naming conventions for files, e.g. "index" for the Index Checker or "testchecker" for the AInferTestChecker
- Returns:
- the appropriate -Astubs argument
 
- 
runpublic void run()- Overrides:
- runin class- CheckerFrameworkPerDirectoryTest
 
 
-