aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2010-01-07 22:49:51 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2010-01-07 22:49:51 +0100
commitaa2643092d2f9e507c6647f69c7e31537f6b1c50 (patch)
tree8b53b87d5943e800d1753915ae03b97db31cc927 /test
parent87044b0bc58b7084c3e207794fde14ed75ff18bc (diff)
downloadlombok-aa2643092d2f9e507c6647f69c7e31537f6b1c50.tar.gz
lombok-aa2643092d2f9e507c6647f69c7e31537f6b1c50.tar.bz2
lombok-aa2643092d2f9e507c6647f69c7e31537f6b1c50.zip
Javac's printer screws up on complex enums. Added tests for this case.
Diffstat (limited to 'test')
-rw-r--r--test/pretty/resource/after/Enum.java35
-rw-r--r--test/pretty/resource/before/Enum.java35
2 files changed, 70 insertions, 0 deletions
diff --git a/test/pretty/resource/after/Enum.java b/test/pretty/resource/after/Enum.java
new file mode 100644
index 00000000..dd738b5b
--- /dev/null
+++ b/test/pretty/resource/after/Enum.java
@@ -0,0 +1,35 @@
+enum Ranks {
+ CLUBS,
+ HEARTS,
+ DIAMONDS,
+ SPADES;
+}
+enum Complex {
+ RED("ff0000"),
+ GREEN("00ff00"),
+ BLUE("0000f");
+ private final String webColour;
+ Complex(String webColour) {
+ this.webColour = webColour;
+ }
+ public String getWebColour() {
+ return webColour;
+ }
+}
+enum Complexer {
+ RED {
+ public void foo() {
+ }
+ public void bar() {
+ }
+ },
+ GREEN("foo") {
+ public void foo() {
+ }
+ };
+ public abstract void foo();
+ Complexer(String colour) {
+ }
+ Complexer() {
+ }
+}
diff --git a/test/pretty/resource/before/Enum.java b/test/pretty/resource/before/Enum.java
new file mode 100644
index 00000000..c1185d53
--- /dev/null
+++ b/test/pretty/resource/before/Enum.java
@@ -0,0 +1,35 @@
+enum Ranks {
+ CLUBS, HEARTS, DIAMONDS, SPADES
+}
+
+enum Complex {
+ RED("ff0000"), GREEN("00ff00"), BLUE("0000f");
+
+ private final String webColour;
+
+ Complex(String webColour) {
+ this.webColour = webColour;
+ }
+
+ public String getWebColour() {
+ return webColour;
+ }
+}
+
+enum Complexer {
+ RED {
+ public void foo() {
+ }
+ public void bar() {
+ }
+ },
+ GREEN("foo") {
+ public void foo() {
+ }
+ };
+ public abstract void foo();
+ Complexer(String colour) {
+ }
+ Complexer() {
+ }
+}