com.google.testing.compile.CompileTester Java Examples

The following examples show how to use com.google.testing.compile.CompileTester. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CompilerTest.java    From Moxy with MIT License 4 votes vote down vote up
protected CompileTester getThat(final JavaFileObject... target) {
	return getThat(Collections.singletonList(new MvpCompiler()), target);
}
 
Example #2
Source File: CompilerTest.java    From Moxy with MIT License 4 votes vote down vote up
protected CompileTester getThat(Collection<? extends Processor> processors, final JavaFileObject... target) {
	return Truth.assert_().about(JavaSourcesSubjectFactory.javaSources())
			.that(Arrays.asList(target))
			.processedWith(processors);
}
 
Example #3
Source File: TestUtils.java    From SensorAnnotations with Apache License 2.0 4 votes vote down vote up
private static CompileTester getBaseCompileTester(String source) {
    return assertAbout(javaSource()).that(forSourceString("test.Test", source))
        .withCompilerOptions("-Xlint:-processing")
        .processedWith(new SensorAnnotationsProcessor());
}
 
Example #4
Source File: IntegrationTestBase.java    From Akatsuki with Apache License 2.0 4 votes vote down vote up
public CompileTester assertTestClass(JavaFileObject testClass) {
	return Truth.ASSERT.about(javaSource()).that(testClass).processedWith(processors());
}
 
Example #5
Source File: ModuleTest.java    From reflection-no-reflection with Apache License 2.0 4 votes vote down vote up
protected CompileTester.SuccessfulCompilationClause assertJavaSourceCompileWithoutError() {
    return ASSERT.about(javaSource())
        .that(javaSourceCode)
        .processedWith(rnrProcessors())
        .compilesWithoutError();
}
 
Example #6
Source File: ModuleTest.java    From reflection-no-reflection with Apache License 2.0 4 votes vote down vote up
protected CompileTester.SuccessfulCompilationClause assertJavaSourceCompileWithoutErrorAndGenerateExpectedSource() {
    return assertJavaSourceCompileWithoutError()
        .and()
        .generatesSources(generatedSourceCode);
}