aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-11-05 23:26:59 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-11-05 23:30:09 +0100
commita73965b2b7b4fe2e163cdb7d104fc5dff1aa7476 (patch)
treedaf21a21c677408ced8c72618ea99beb72efb1f6 /test/transform
parent2c0ec9315577cbc8d406aca2b3f3b6ad233f4f35 (diff)
downloadlombok-a73965b2b7b4fe2e163cdb7d104fc5dff1aa7476.tar.gz
lombok-a73965b2b7b4fe2e163cdb7d104fc5dff1aa7476.tar.bz2
lombok-a73965b2b7b4fe2e163cdb7d104fc5dff1aa7476.zip
[fixes #1918] toString now supports a configkey to tell it how to deal with super.
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/ToStringAutoSuper.java15
-rw-r--r--test/transform/resource/after-ecj/ToStringAutoSuper.java16
-rw-r--r--test/transform/resource/before/ToStringAutoSuper.java8
3 files changed, 39 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ToStringAutoSuper.java b/test/transform/resource/after-delombok/ToStringAutoSuper.java
new file mode 100644
index 00000000..1fe59581
--- /dev/null
+++ b/test/transform/resource/after-delombok/ToStringAutoSuper.java
@@ -0,0 +1,15 @@
+class ToStringAutoSuperWithNoParent {
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "ToStringAutoSuperWithNoParent()";
+ }
+}
+
+class ToStringAutoSuperWithParent extends ToStringAutoSuperWithNoParent {
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "ToStringAutoSuperWithParent(super=" + super.toString() + ")";
+ }
+}
diff --git a/test/transform/resource/after-ecj/ToStringAutoSuper.java b/test/transform/resource/after-ecj/ToStringAutoSuper.java
new file mode 100644
index 00000000..fb468ddc
--- /dev/null
+++ b/test/transform/resource/after-ecj/ToStringAutoSuper.java
@@ -0,0 +1,16 @@
+@lombok.ToString class ToStringAutoSuperWithNoParent {
+ ToStringAutoSuperWithNoParent() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return "ToStringAutoSuperWithNoParent()";
+ }
+}
+@lombok.ToString class ToStringAutoSuperWithParent extends ToStringAutoSuperWithNoParent {
+ ToStringAutoSuperWithParent() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("ToStringAutoSuperWithParent(super=" + super.toString()) + ")");
+ }
+}
diff --git a/test/transform/resource/before/ToStringAutoSuper.java b/test/transform/resource/before/ToStringAutoSuper.java
new file mode 100644
index 00000000..e98664ba
--- /dev/null
+++ b/test/transform/resource/before/ToStringAutoSuper.java
@@ -0,0 +1,8 @@
+//CONF: lombok.toString.callSuper = CALL
+@lombok.ToString
+class ToStringAutoSuperWithNoParent {
+}
+
+@lombok.ToString
+class ToStringAutoSuperWithParent extends ToStringAutoSuperWithNoParent {
+}