public static final class JavaSourcesSubject.SingleSourceAdapter extends com.google.common.truth.Subject<JavaSourcesSubject.SingleSourceAdapter,JavaFileObject> implements CompileTester, ProcessedCompileTesterFactory
CompileTester.ChainingClause<T>, CompileTester.CleanCompilationClause, CompileTester.ColumnClause<T>, CompileTester.CompilationWithNotesClause<T>, CompileTester.CompilationWithWarningsClause<T>, CompileTester.FileClause<T>, CompileTester.GeneratedPredicateClause<T>, CompileTester.LineClause<T>, CompileTester.SuccessfulCompilationClause, CompileTester.SuccessfulFileClause<T>, CompileTester.UnsuccessfulCompilationClause| Modifier and Type | Method and Description |
|---|---|
CompileTester.SuccessfulCompilationClause |
compilesWithoutError()
The clause in the fluent API that tests for successful compilation without errors.
|
CompileTester.CleanCompilationClause |
compilesWithoutWarnings()
The clause in the fluent API that tests for successful compilation without warnings or
errors.
|
CompileTester.UnsuccessfulCompilationClause |
failsToCompile()
The clause in the fluent API that tests for unsuccessful compilation.
|
void |
parsesAs(JavaFileObject first,
JavaFileObject... rest)
The clause in the fluent API that tests that the code parses equivalently to the specified
code.
|
CompileTester |
processedWith(Iterable<? extends Processor> processors)
Adds annotation processors to the compilation being tested.
|
CompileTester |
processedWith(Processor first,
Processor... rest)
Adds annotation processors to the compilation being tested.
|
JavaSourcesSubject |
withClasspathFrom(ClassLoader classLoader)
Attempts to extract the classpath from the classpath of the Classloader argument, including all
its parents up to (and including) the System Classloader.
|
JavaSourcesSubject |
withCompilerOptions(Iterable<String> options)
Adds options that will be passed to the compiler.
|
JavaSourcesSubject |
withCompilerOptions(String... options)
Adds options that will be passed to the compiler.
|
actual, actualAsString, actualCustomStringRepresentation, check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hashCode, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, namedpublic JavaSourcesSubject withCompilerOptions(Iterable<String> options)
ProcessedCompileTesterFactory-Xlint is the first option, by
default.withCompilerOptions in interface ProcessedCompileTesterFactorypublic JavaSourcesSubject withCompilerOptions(String... options)
ProcessedCompileTesterFactory-Xlint is the first option, by
default.withCompilerOptions in interface ProcessedCompileTesterFactorypublic JavaSourcesSubject withClasspathFrom(ClassLoader classLoader)
ProcessedCompileTesterFactoryIf not specified, we will use the System classpath for compilation.
withClasspathFrom in interface ProcessedCompileTesterFactorypublic CompileTester processedWith(Processor first, Processor... rest)
ProcessedCompileTesterFactoryprocessedWith in interface ProcessedCompileTesterFactorypublic CompileTester processedWith(Iterable<? extends Processor> processors)
ProcessedCompileTesterFactoryprocessedWith in interface ProcessedCompileTesterFactorypublic CompileTester.SuccessfulCompilationClause compilesWithoutError()
CompileTestercompilesWithoutError in interface CompileTesterpublic CompileTester.CleanCompilationClause compilesWithoutWarnings()
CompileTestercompilesWithoutWarnings in interface CompileTesterpublic CompileTester.UnsuccessfulCompilationClause failsToCompile()
CompileTesterfailsToCompile in interface CompileTesterpublic void parsesAs(JavaFileObject first, JavaFileObject... rest)
CompileTesterparsesAs in interface CompileTesterCopyright © 2013-2017. All Rights Reserved.