Search in sources :

Example 1 with MemoizeExtension

use of com.google.auto.value.extension.memoized.processor.MemoizeExtension in project auto by google.

the class MemoizedMethodSubject method hasError.

void hasError(String error) {
    JavaFileObject file = JavaFileObjects.forSourceLines("Value", "import com.google.auto.value.AutoValue;", "import com.google.auto.value.extension.memoized.Memoized;", "", "@AutoValue abstract class Value {", "  abstract String string();", actual, "}");
    Compilation compilation = javac().withProcessors(new AutoValueProcessor(ImmutableList.of(new MemoizeExtension()))).compile(file);
    assertThat(compilation).hadErrorContaining(error).inFile(file).onLineContaining(actual);
}
Also used : JavaFileObject(javax.tools.JavaFileObject) AutoValueProcessor(com.google.auto.value.processor.AutoValueProcessor) Compilation(com.google.testing.compile.Compilation) MemoizeExtension(com.google.auto.value.extension.memoized.processor.MemoizeExtension)

Aggregations

MemoizeExtension (com.google.auto.value.extension.memoized.processor.MemoizeExtension)1 AutoValueProcessor (com.google.auto.value.processor.AutoValueProcessor)1 Compilation (com.google.testing.compile.Compilation)1 JavaFileObject (javax.tools.JavaFileObject)1