diff options
Diffstat (limited to 'value/src/test/java/com/google')
-rw-r--r-- | value/src/test/java/com/google/auto/value/processor/AutoValueCompilationTest.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/value/src/test/java/com/google/auto/value/processor/AutoValueCompilationTest.java b/value/src/test/java/com/google/auto/value/processor/AutoValueCompilationTest.java index 4a87282b..e20eb448 100644 --- a/value/src/test/java/com/google/auto/value/processor/AutoValueCompilationTest.java +++ b/value/src/test/java/com/google/auto/value/processor/AutoValueCompilationTest.java @@ -1866,10 +1866,15 @@ public class AutoValueCompilationTest { .withProcessors(new AutoValueProcessor(), new AutoValueBuilderProcessor()) .compile(javaFileObject); assertThat(compilation) - .hadErrorContaining( - "Method matches a property of foo.bar.Baz but has return type T instead of U") + .hadErrorContainingMatch( + "Method matches a property of foo\\.bar\\.Baz<T, ?U> but has return type T instead of" + + " U") .inFile(javaFileObject) .onLineContaining("T blam()"); + // The <T, ?U> is because we're depending on TypeMirror.toString(), and the JDK actually spells + // this as <T,U> with no space. While it's not completely sound to expect a given string from + // TypeMirror.toString(), in practice it's hard to imagine that it would be anything other + // than "foo.bar.Baz<T,U>" or "foo.bar.Baz<T, U>" given the specification. } @Test |