public static final class JavaSourcesSubject.SingleSourceAdapter extends com.google.common.truth.Subject<JavaSourcesSubject.SingleSourceAdapter,javax.tools.JavaFileObject> implements CompileTester, ProcessedCompileTesterFactory
com.google.common.truth.Subject.Factory<SubjectT extends com.google.common.truth.Subject<SubjectT,ActualT>,ActualT>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(javax.tools.JavaFileObject first,
javax.tools.JavaFileObject... rest)
The clause in the fluent API that tests that the code parses equivalently to the specified
code.
|
CompileTester |
processedWith(java.lang.Iterable<? extends javax.annotation.processing.Processor> processors)
Adds annotation processors to the compilation being tested.
|
CompileTester |
processedWith(javax.annotation.processing.Processor first,
javax.annotation.processing.Processor... rest)
Adds annotation processors to the compilation being tested.
|
JavaSourcesSubject |
withClasspathFrom(java.lang.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(java.lang.Iterable<java.lang.String> options)
Adds options that will be passed to the compiler.
|
JavaSourcesSubject |
withCompilerOptions(java.lang.String... options)
Adds options that will be passed to the compiler.
|
actual, actualAsString, actualCustomStringRepresentation, check, equals, fail, fail, fail, failComparing, failComparing, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutSubject, failWithRawMessage, failWithRawMessageAndCause, getDisplaySubject, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, namedpublic JavaSourcesSubject withCompilerOptions(java.lang.Iterable<java.lang.String> options)
ProcessedCompileTesterFactory-Xlint is the first option, by
default.withCompilerOptions in interface ProcessedCompileTesterFactorypublic JavaSourcesSubject withCompilerOptions(java.lang.String... options)
ProcessedCompileTesterFactory-Xlint is the first option, by
default.withCompilerOptions in interface ProcessedCompileTesterFactorypublic JavaSourcesSubject withClasspathFrom(java.lang.ClassLoader classLoader)
ProcessedCompileTesterFactoryIf not specified, we will use the System classpath for compilation.
withClasspathFrom in interface ProcessedCompileTesterFactorypublic CompileTester processedWith(javax.annotation.processing.Processor first, javax.annotation.processing.Processor... rest)
ProcessedCompileTesterFactoryprocessedWith in interface ProcessedCompileTesterFactorypublic CompileTester processedWith(java.lang.Iterable<? extends javax.annotation.processing.Processor> processors)
ProcessedCompileTesterFactoryprocessedWith in interface ProcessedCompileTesterFactory@CanIgnoreReturnValue public CompileTester.SuccessfulCompilationClause compilesWithoutError()
CompileTestercompilesWithoutError in interface CompileTester@CanIgnoreReturnValue public CompileTester.CleanCompilationClause compilesWithoutWarnings()
CompileTestercompilesWithoutWarnings in interface CompileTester@CanIgnoreReturnValue public CompileTester.UnsuccessfulCompilationClause failsToCompile()
CompileTesterfailsToCompile in interface CompileTesterpublic void parsesAs(javax.tools.JavaFileObject first,
javax.tools.JavaFileObject... rest)
CompileTesterparsesAs in interface CompileTesterCopyright © 2013-2017. All Rights Reserved.