Class ReflectionTest
java.lang.Object
org.checkerframework.framework.test.CheckerFrameworkPerDirectoryTest
org.checkerframework.framework.test.junit.ReflectionTest
Tests the reflection resolution using a simple type system.
-
Field Summary
Fields inherited from class org.checkerframework.framework.test.CheckerFrameworkPerDirectoryTest
checkerNames, checkerOptions, classpathExtra, testDir, testFiles -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckResult(TypecheckResult typecheckResult) Check that theTypecheckResultdid not fail.customizeOptions(List<String> previousOptions) Override this method if you would like to supply a checker command-line option that depends on the Java files passed to the test.protected StringgetFullPath(File javaFile, String filename) static String[]protected FileResolves the test root directory from the optionalTestRootDirectoryannotation or falls back to the default ofcurrentDir/tests.Methods inherited from class org.checkerframework.framework.test.CheckerFrameworkPerDirectoryTest
adjustTypecheckResult, run
-
Constructor Details
-
ReflectionTest
- Parameters:
testFiles- the files containing test code, which will be type-checked
-
-
Method Details
-
getTestDirs
-
customizeOptions
Description copied from class:CheckerFrameworkPerDirectoryTestOverride this method if you would like to supply a checker command-line option that depends on the Java files passed to the test. Those files are available in fieldCheckerFrameworkPerDirectoryTest.testFiles.If you want to specify the same command-line option for all tests of a particular checker, then pass it to the
CheckerFrameworkPerDirectoryTest(java.util.List<java.io.File>, java.util.List<java.lang.String>, java.lang.String, java.util.List<java.lang.String>, java.lang.String...)constructor.- Overrides:
customizeOptionsin classCheckerFrameworkPerDirectoryTest- Parameters:
previousOptions- the options specified in the constructor of the test previousOptions is unmodifiable- Returns:
- a new list of options or the original passed through
-
getFullPath
-
resolveTestDirectory
Resolves the test root directory from the optionalTestRootDirectoryannotation or falls back to the default ofcurrentDir/tests.- Returns:
- the resolved directory
-
checkResult
Check that theTypecheckResultdid not fail.- Parameters:
typecheckResult- result to check
-