aboutsummaryrefslogtreecommitdiff
path: root/factory
diff options
context:
space:
mode:
authorronshapiro <ronshapiro@google.com>2017-02-07 07:36:07 -0800
committerRon Shapiro <ronshapiro@google.com>2017-02-16 14:35:56 -0500
commit96e3f54c86f9b726c81a90538fb08c7bb9c31917 (patch)
tree3fdbd7b66228848b1af66ea1a6ae6527d1f1f554 /factory
parent1b8a41d5c91be67416ec6c4bb054b1272c9ba1d9 (diff)
downloadauto-96e3f54c86f9b726c81a90538fb08c7bb9c31917.tar.gz
Fix test which asserted the existence of a diagnostic on an annotation value, which was not correctly implemented by javac.
This bug has been patched and will be in the next version of javac. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146784756
Diffstat (limited to 'factory')
-rw-r--r--factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java4
-rw-r--r--factory/src/test/resources/bad/MixedFinals.java11
2 files changed, 10 insertions, 5 deletions
diff --git a/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java b/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java
index 58228ee4..042f3989 100644
--- a/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java
+++ b/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java
@@ -177,10 +177,10 @@ public class AutoFactoryProcessorTest {
.failsToCompile()
.withErrorContaining(
"Cannot mix allowSubclasses=true and allowSubclasses=false in one factory.")
- .in(file).onLine(22).atColumn(3)
+ .in(file).onLine(24)
.and().withErrorContaining(
"Cannot mix allowSubclasses=true and allowSubclasses=false in one factory.")
- .in(file).onLine(23).atColumn(3);
+ .in(file).onLine(27);
}
@Test public void failsOnGenericClass() {
diff --git a/factory/src/test/resources/bad/MixedFinals.java b/factory/src/test/resources/bad/MixedFinals.java
index 8d41f6bd..56538f06 100644
--- a/factory/src/test/resources/bad/MixedFinals.java
+++ b/factory/src/test/resources/bad/MixedFinals.java
@@ -18,7 +18,12 @@ package tests;
import com.google.auto.factory.AutoFactory;
final class MixedFinals {
- @AutoFactory(allowSubclasses = false) MixedFinals() {}
- @AutoFactory(allowSubclasses = true) MixedFinals(String s) {}
- @AutoFactory(allowSubclasses = true) MixedFinals(String s, Integer i) {}
+ @AutoFactory(allowSubclasses = false)
+ MixedFinals() {}
+
+ @AutoFactory(allowSubclasses = true)
+ MixedFinals(String s) {}
+
+ @AutoFactory(allowSubclasses = true)
+ MixedFinals(String s, Integer i) {}
}