Uses of Class
com.google.errorprone.CompilationTestHelper
Packages that use CompilationTestHelper
-
Uses of CompilationTestHelper in com.google.errorprone
Methods in com.google.errorprone that return CompilationTestHelperModifier and TypeMethodDescriptionCompilationTestHelper.addModules
(String... modules) CompilationTestHelper.addSourceFile
(String path) Adds a source file to the test compilation, from an existing resource file.CompilationTestHelper.addSourceLines
(String path, String... lines) Adds a source file to the test compilation, from the string content of the file.CompilationTestHelper.expectErrorMessage
(String key, Predicate<? super String> matcher) Expects an error message matchingmatcher
at the line below a comment matching the key.CompilationTestHelper.expectNoDiagnostics()
Tells the compilation helper to expect that no diagnostics will be generated, even if the source file contains bug markers.CompilationTestHelper.expectResult
(com.sun.tools.javac.main.Main.Result result) Tells the compilation helper to expect a specific result from the compilation, e.g.CompilationTestHelper.matchAllDiagnostics()
By default, the compilation helper will only inspect diagnostics generated by the check being tested.static CompilationTestHelper
CompilationTestHelper.newInstance
(ScannerSupplier scannerSupplier, Class<?> clazz) Returns a newCompilationTestHelper
.static CompilationTestHelper
CompilationTestHelper.newInstance
(Class<? extends BugChecker> checker, Class<?> clazz) Returns a newCompilationTestHelper
.Sets custom command-line arguments for the compilation.Sets custom command-line arguments for the compilation.CompilationTestHelper.withClasspath
(Class<?>... classes) Sets the classpath for the test compilation, overriding the default of using the runtime classpath of the test execution.