aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/DataOnEnum.java2
-rw-r--r--test/transform/resource/after-delombok/ToStringEnum.java28
-rw-r--r--test/transform/resource/after-ecj/DataOnEnum.java2
-rw-r--r--test/transform/resource/after-ecj/ToStringEnum.java41
-rw-r--r--test/transform/resource/before/ToStringEnum.java17
5 files changed, 88 insertions, 2 deletions
diff --git a/test/transform/resource/after-delombok/DataOnEnum.java b/test/transform/resource/after-delombok/DataOnEnum.java
index 2486646b..6b5779e8 100644
--- a/test/transform/resource/after-delombok/DataOnEnum.java
+++ b/test/transform/resource/after-delombok/DataOnEnum.java
@@ -8,7 +8,7 @@ public enum DataOnEnum {
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
- return "DataOnEnum(someField=" + this.getSomeField() + ")";
+ return "DataOnEnum." + this.name() + "(someField=" + this.getSomeField() + ")";
}
@java.lang.SuppressWarnings("all")
private DataOnEnum(final String someField) {
diff --git a/test/transform/resource/after-delombok/ToStringEnum.java b/test/transform/resource/after-delombok/ToStringEnum.java
new file mode 100644
index 00000000..9d852e19
--- /dev/null
+++ b/test/transform/resource/after-delombok/ToStringEnum.java
@@ -0,0 +1,28 @@
+enum ToStringEnum1 {
+ CONSTANT;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "ToStringEnum1." + this.name();
+ }
+}
+enum ToStringEnum2 {
+ CONSTANT;
+ int x;
+ String name;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "ToStringEnum2." + this.name() + "(x=" + this.x + ", name=" + this.name + ")";
+ }
+}
+class ToStringEnum3 {
+ enum MemberEnum {
+ CONSTANT;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "ToStringEnum3.MemberEnum." + this.name();
+ }
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/DataOnEnum.java b/test/transform/resource/after-ecj/DataOnEnum.java
index 0f07088e..31eb12ec 100644
--- a/test/transform/resource/after-ecj/DataOnEnum.java
+++ b/test/transform/resource/after-ecj/DataOnEnum.java
@@ -7,7 +7,7 @@ public @lombok.Getter @lombok.ToString @lombok.RequiredArgsConstructor enum Data
return this.someField;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
- return (("DataOnEnum(someField=" + this.getSomeField()) + ")");
+ return (((("DataOnEnum." + this.name()) + "(someField=") + this.getSomeField()) + ")");
}
private @java.lang.SuppressWarnings("all") DataOnEnum(final String someField) {
super();
diff --git a/test/transform/resource/after-ecj/ToStringEnum.java b/test/transform/resource/after-ecj/ToStringEnum.java
new file mode 100644
index 00000000..d4ab5a93
--- /dev/null
+++ b/test/transform/resource/after-ecj/ToStringEnum.java
@@ -0,0 +1,41 @@
+import lombok.ToString;
+@ToString enum ToStringEnum1 {
+ CONSTANT(),
+ <clinit>() {
+ }
+ ToStringEnum1() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return ("ToStringEnum1." + this.name());
+ }
+}
+@ToString enum ToStringEnum2 {
+ CONSTANT(),
+ int x;
+ String name;
+ <clinit>() {
+ }
+ ToStringEnum2() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (((((("ToStringEnum2." + this.name()) + "(x=") + this.x) + ", name=") + this.name) + ")");
+ }
+}
+class ToStringEnum3 {
+ @ToString enum MemberEnum {
+ CONSTANT(),
+ <clinit>() {
+ }
+ MemberEnum() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return ("ToStringEnum3.MemberEnum." + this.name());
+ }
+ }
+ ToStringEnum3() {
+ super();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/ToStringEnum.java b/test/transform/resource/before/ToStringEnum.java
new file mode 100644
index 00000000..8b8ad576
--- /dev/null
+++ b/test/transform/resource/before/ToStringEnum.java
@@ -0,0 +1,17 @@
+import lombok.ToString;
+@ToString
+enum ToStringEnum1 {
+ CONSTANT;
+}
+@ToString
+enum ToStringEnum2 {
+ CONSTANT();
+ int x;
+ String name;
+}
+class ToStringEnum3 {
+ @ToString
+ enum MemberEnum {
+ CONSTANT;
+ }
+} \ No newline at end of file