aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-02-07 23:20:19 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-02-07 23:21:15 +0100
commitb15bcb09e9e05b584e73c999dd9c29b6cfb94a44 (patch)
tree50b14d9296222133830ebc761154ff6e2633c8ef /test
parent492c6f3da86fd5deb4c842bdaadc6396dc831237 (diff)
downloadlombok-b15bcb09e9e05b584e73c999dd9c29b6cfb94a44.tar.gz
lombok-b15bcb09e9e05b584e73c999dd9c29b6cfb94a44.tar.bz2
lombok-b15bcb09e9e05b584e73c999dd9c29b6cfb94a44.zip
Added test to confirm behaviour of @RequiredArgsConstructor, @ToString, and @Getter on enums.
Diffstat (limited to 'test')
-rw-r--r--test/transform/resource/after-delombok/DataOnEnum.java17
-rw-r--r--test/transform/resource/after-ecj/DataOnEnum.java16
-rw-r--r--test/transform/resource/before/DataOnEnum.java7
3 files changed, 40 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/DataOnEnum.java b/test/transform/resource/after-delombok/DataOnEnum.java
new file mode 100644
index 00000000..5cfe8823
--- /dev/null
+++ b/test/transform/resource/after-delombok/DataOnEnum.java
@@ -0,0 +1,17 @@
+public enum DataOnEnum {
+ A("hello");
+ private final String someField;
+ @java.lang.SuppressWarnings("all")
+ public String getSomeField() {
+ return this.someField;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "DataOnEnum(someField=" + this.getSomeField() + ")";
+ }
+ @java.lang.SuppressWarnings("all")
+ private DataOnEnum(final String someField) {
+ this.someField = someField;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/DataOnEnum.java b/test/transform/resource/after-ecj/DataOnEnum.java
new file mode 100644
index 00000000..8bab5925
--- /dev/null
+++ b/test/transform/resource/after-ecj/DataOnEnum.java
@@ -0,0 +1,16 @@
+public @lombok.Getter @lombok.ToString @lombok.RequiredArgsConstructor enum DataOnEnum {
+ A("hello"),
+ private final String someField;
+ <clinit>() {
+ }
+ private @java.lang.SuppressWarnings("all") DataOnEnum(final String someField) {
+ super();
+ this.someField = someField;
+ }
+ public @java.lang.SuppressWarnings("all") String getSomeField() {
+ return this.someField;
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("DataOnEnum(someField=" + this.getSomeField()) + ")");
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/DataOnEnum.java b/test/transform/resource/before/DataOnEnum.java
new file mode 100644
index 00000000..e10c93eb
--- /dev/null
+++ b/test/transform/resource/before/DataOnEnum.java
@@ -0,0 +1,7 @@
+@lombok.Getter
+@lombok.ToString
+@lombok.RequiredArgsConstructor
+public enum DataOnEnum {
+ A("hello");
+ private final String someField;
+} \ No newline at end of file