aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/configuration/resource/configurationRoot/out.txt12
-rw-r--r--test/transform/resource/after-delombok/BuilderSingletonRedirectToGuava.java75
-rw-r--r--test/transform/resource/after-ecj/BuilderSingletonRedirectToGuava.java71
-rw-r--r--test/transform/resource/before/BuilderSingletonRedirectToGuava.java13
-rw-r--r--test/transform/src/lombok/transform/TestWithEcj.java4
5 files changed, 165 insertions, 10 deletions
diff --git a/test/configuration/resource/configurationRoot/out.txt b/test/configuration/resource/configurationRoot/out.txt
index 625115a4..de219694 100644
--- a/test/configuration/resource/configurationRoot/out.txt
+++ b/test/configuration/resource/configurationRoot/out.txt
@@ -8,7 +8,7 @@ lombok.accessors.flagUsage = ERROR
# BASE/d1/d11/lombok.config:
# 3: lombok.accessors.flagUsage = ERROR
-# Generate setters that return 'this' instead of 'void'.
+# Generate setters that return 'this' instead of 'void' (default: false).
lombok.accessors.chain = false
# BASE/d1/lombok.config:
# <'lombok.accessors.chain' not mentioned>
@@ -24,7 +24,7 @@ lombok.accessors.prefix += f
# BASE/d1/d11/lombok.config:
# 4: lombok.accessors.prefix += f
-# Use this name for the generated logger fields (default: 'log')
+# Use this name for the generated logger fields (default: 'log').
clear lombok.log.fieldName
@@ -43,7 +43,7 @@ lombok.accessors.flagUsage = ERROR
# BASE/d1/d11/d111/lombok.config:
# <'lombok.accessors.flagUsage' not mentioned>
-# Generate setters that return 'this' instead of 'void'.
+# Generate setters that return 'this' instead of 'void' (default: false).
clear lombok.accessors.chain
# BASE/d1/lombok.config:
# <'lombok.accessors.chain' not mentioned>
@@ -66,7 +66,7 @@ lombok.accessors.prefix += m_
# BASE/d1/d11/d111/lombok.config:
# 2: lombok.accessors.prefix += m_
-# Use this name for the generated logger fields (default: 'log')
+# Use this name for the generated logger fields (default: 'log').
clear lombok.log.fieldName
@@ -75,7 +75,7 @@ Configuration for 'BASE/d1/d12'.
# Emit a warning or error if @Accessors is used.
clear lombok.accessors.flagUsage
-# Generate setters that return 'this' instead of 'void'.
+# Generate setters that return 'this' instead of 'void' (default: false).
lombok.accessors.chain = true
# BASE/d1/lombok.config:
# <'lombok.accessors.chain' not mentioned>
@@ -86,5 +86,5 @@ lombok.accessors.chain = true
# Strip this field prefix, like 'f' or 'm_', from the names of generated getters and setters.
clear lombok.accessors.prefix
-# Use this name for the generated logger fields (default: 'log')
+# Use this name for the generated logger fields (default: 'log').
clear lombok.log.fieldName \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/BuilderSingletonRedirectToGuava.java b/test/transform/resource/after-delombok/BuilderSingletonRedirectToGuava.java
new file mode 100644
index 00000000..a2d230a1
--- /dev/null
+++ b/test/transform/resource/after-delombok/BuilderSingletonRedirectToGuava.java
@@ -0,0 +1,75 @@
+import java.util.Set;
+import java.util.NavigableMap;
+import java.util.Collection;
+class BuilderSingletonRedirectToGuava {
+ private Set<String> dangerMice;
+ private NavigableMap<Integer, Number> things;
+ private Collection<Class<?>> doohickeys;
+ @java.lang.SuppressWarnings("all")
+ BuilderSingletonRedirectToGuava(final Set<String> dangerMice, final NavigableMap<Integer, Number> things, final Collection<Class<?>> doohickeys) {
+ this.dangerMice = dangerMice;
+ this.things = things;
+ this.doohickeys = doohickeys;
+ }
+ @java.lang.SuppressWarnings("all")
+ public static class BuilderSingletonRedirectToGuavaBuilder {
+ private com.google.common.collect.ImmutableSet.Builder<String> dangerMice;
+ private com.google.common.collect.ImmutableSortedMap.Builder<Integer, Number> things;
+ private com.google.common.collect.ImmutableList.Builder<Class<?>> doohickeys;
+ @java.lang.SuppressWarnings("all")
+ BuilderSingletonRedirectToGuavaBuilder() {
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingletonRedirectToGuavaBuilder dangerMouse(final String dangerMouse) {
+ if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder();
+ this.dangerMice.add(dangerMouse);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingletonRedirectToGuavaBuilder dangerMice(final java.lang.Iterable<? extends String> dangerMice) {
+ if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder();
+ this.dangerMice.addAll(dangerMice);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingletonRedirectToGuavaBuilder thing(final Integer thing$key, final Number thing$value) {
+ if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder();
+ this.things.put(thing$key, thing$value);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingletonRedirectToGuavaBuilder things(final java.util.Map<? extends Integer, ? extends Number> things) {
+ if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder();
+ this.things.putAll(things);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingletonRedirectToGuavaBuilder doohickey(final Class<?> doohickey) {
+ if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder();
+ this.doohickeys.add(doohickey);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingletonRedirectToGuavaBuilder doohickeys(final java.lang.Iterable<? extends Class<?>> doohickeys) {
+ if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder();
+ this.doohickeys.addAll(doohickeys);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingletonRedirectToGuava build() {
+ java.util.Set<String> dangerMice = this.dangerMice == null ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build();
+ java.util.NavigableMap<Integer, Number> things = this.things == null ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build();
+ java.util.Collection<Class<?>> doohickeys = this.doohickeys == null ? com.google.common.collect.ImmutableList.of() : this.doohickeys.build();
+ return new BuilderSingletonRedirectToGuava(dangerMice, things, doohickeys);
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "BuilderSingletonRedirectToGuava.BuilderSingletonRedirectToGuavaBuilder(dangerMice=" + this.dangerMice + ", things=" + this.things + ", doohickeys=" + this.doohickeys + ")";
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ public static BuilderSingletonRedirectToGuavaBuilder builder() {
+ return new BuilderSingletonRedirectToGuavaBuilder();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/BuilderSingletonRedirectToGuava.java b/test/transform/resource/after-ecj/BuilderSingletonRedirectToGuava.java
new file mode 100644
index 00000000..ce8fab10
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderSingletonRedirectToGuava.java
@@ -0,0 +1,71 @@
+import java.util.Set;
+import java.util.NavigableMap;
+import java.util.Collection;
+import lombok.Singular;
+@lombok.Builder class BuilderSingletonRedirectToGuava {
+ public static @java.lang.SuppressWarnings("all") class BuilderSingletonRedirectToGuavaBuilder {
+ private com.google.common.collect.ImmutableSet.Builder<String> dangerMice;
+ private com.google.common.collect.ImmutableSortedMap.Builder<Integer, Number> things;
+ private com.google.common.collect.ImmutableList.Builder<Class<?>> doohickeys;
+ @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder dangerMouse(String dangerMouse) {
+ if ((this.dangerMice == null))
+ this.dangerMice = com.google.common.collect.ImmutableSet.builder();
+ this.dangerMice.add(dangerMouse);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder dangerMice(java.lang.Iterable<? extends String> dangerMice) {
+ if ((this.dangerMice == null))
+ this.dangerMice = com.google.common.collect.ImmutableSet.builder();
+ this.dangerMice.addAll(dangerMice);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder thing(Integer thing$key, Number thing$value) {
+ if ((this.things == null))
+ this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder();
+ this.things.put(thing$key, thing$value);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder things(java.util.Map<? extends Integer, ? extends Number> things) {
+ if ((this.things == null))
+ this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder();
+ this.things.putAll(things);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder doohickey(Class<?> doohickey) {
+ if ((this.doohickeys == null))
+ this.doohickeys = com.google.common.collect.ImmutableList.builder();
+ this.doohickeys.add(doohickey);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder doohickeys(java.lang.Iterable<? extends Class<?>> doohickeys) {
+ if ((this.doohickeys == null))
+ this.doohickeys = com.google.common.collect.ImmutableList.builder();
+ this.doohickeys.addAll(doohickeys);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuava build() {
+ java.util.Set<String> dangerMice = ((this.dangerMice == null) ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build());
+ java.util.NavigableMap<Integer, Number> things = ((this.things == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build());
+ java.util.Collection<Class<?>> doohickeys = ((this.doohickeys == null) ? com.google.common.collect.ImmutableList.of() : this.doohickeys.build());
+ return new BuilderSingletonRedirectToGuava(dangerMice, things, doohickeys);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (((((("BuilderSingletonRedirectToGuava.BuilderSingletonRedirectToGuavaBuilder(dangerMice=" + this.dangerMice) + ", things=") + this.things) + ", doohickeys=") + this.doohickeys) + ")");
+ }
+ }
+ private @Singular Set<String> dangerMice;
+ private @Singular NavigableMap<Integer, Number> things;
+ private @Singular Collection<Class<?>> doohickeys;
+ @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuava(final Set<String> dangerMice, final NavigableMap<Integer, Number> things, final Collection<Class<?>> doohickeys) {
+ super();
+ this.dangerMice = dangerMice;
+ this.things = things;
+ this.doohickeys = doohickeys;
+ }
+ public static @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder builder() {
+ return new BuilderSingletonRedirectToGuavaBuilder();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/BuilderSingletonRedirectToGuava.java b/test/transform/resource/before/BuilderSingletonRedirectToGuava.java
new file mode 100644
index 00000000..0429f0ed
--- /dev/null
+++ b/test/transform/resource/before/BuilderSingletonRedirectToGuava.java
@@ -0,0 +1,13 @@
+//CONF: lombok.builder.useGuava = true
+import java.util.Set;
+import java.util.NavigableMap;
+import java.util.Collection;
+
+import lombok.Singular;
+
+@lombok.Builder
+class BuilderSingletonRedirectToGuava {
+ @Singular private Set<String> dangerMice;
+ @Singular private NavigableMap<Integer, Number> things;
+ @Singular private Collection<Class<?>> doohickeys;
+}
diff --git a/test/transform/src/lombok/transform/TestWithEcj.java b/test/transform/src/lombok/transform/TestWithEcj.java
index 4c3f6bf8..0a4057dd 100644
--- a/test/transform/src/lombok/transform/TestWithEcj.java
+++ b/test/transform/src/lombok/transform/TestWithEcj.java
@@ -57,8 +57,4 @@ public class TestWithEcj extends DirectoryRunner.TestParams {
public File getMessagesDirectory() {
return new File("test/transform/resource/messages-ecj");
}
-
- @Override public boolean accept(File file) {
- return file.getName().startsWith("BuilderSingleton");
- }
}