aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-02-07 21:33:29 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-02-07 21:35:34 +0100
commit30b63deaff82128ca8c3e7b59884b4fc2caf929c (patch)
tree7bed68accda1528297b1c6d5997fe50e3a4ae155
parentc98cec7d2ddceddcc0f127185912be4f826a6caa (diff)
downloadlombok-30b63deaff82128ca8c3e7b59884b4fc2caf929c.tar.gz
lombok-30b63deaff82128ca8c3e7b59884b4fc2caf929c.tar.bz2
lombok-30b63deaff82128ca8c3e7b59884b4fc2caf929c.zip
Testcases updated with new behaviour of @Getter/@Setter on booleans.
-rw-r--r--test/transform/resource/after-delombok/GetterAlreadyExists.java8
-rw-r--r--test/transform/resource/after-delombok/GetterBoolean.java12
-rw-r--r--test/transform/resource/after-delombok/SetterAccessLevel.java8
-rw-r--r--test/transform/resource/after-delombok/SetterAlreadyExists.java10
-rw-r--r--test/transform/resource/after-delombok/SetterOnClass.java12
-rw-r--r--test/transform/resource/after-ecj/GetterAlreadyExists.java6
-rw-r--r--test/transform/resource/after-ecj/GetterBoolean.java14
-rw-r--r--test/transform/resource/after-ecj/SetterAccessLevel.java8
-rw-r--r--test/transform/resource/after-ecj/SetterAlreadyExists.java16
-rw-r--r--test/transform/resource/after-ecj/SetterOnClass.java12
-rw-r--r--test/transform/resource/before/GetterBoolean.java7
-rw-r--r--test/transform/resource/before/SetterAlreadyExists.java10
-rw-r--r--test/transform/resource/messages-delombok/GetterAlreadyExists.java.messages4
-rw-r--r--test/transform/resource/messages-delombok/GetterBoolean.java.messages2
-rw-r--r--test/transform/resource/messages-delombok/SetterAlreadyExists.java.messages16
-rw-r--r--test/transform/resource/messages-ecj/GetterAlreadyExists.java.messages2
-rw-r--r--test/transform/resource/messages-ecj/GetterBoolean.java.messages2
-rw-r--r--test/transform/resource/messages-ecj/SetterAlreadyExists.java.messages16
18 files changed, 121 insertions, 44 deletions
diff --git a/test/transform/resource/after-delombok/GetterAlreadyExists.java b/test/transform/resource/after-delombok/GetterAlreadyExists.java
index 6a5377ba..d0a01c88 100644
--- a/test/transform/resource/after-delombok/GetterAlreadyExists.java
+++ b/test/transform/resource/after-delombok/GetterAlreadyExists.java
@@ -3,6 +3,10 @@ class Getter1 {
boolean hasFoo() {
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean isFoo() {
+ return this.foo;
+ }
}
class Getter2 {
boolean foo;
@@ -73,6 +77,10 @@ class Getter10 {
static boolean hasFoo() {
return false;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean isFoo() {
+ return this.foo;
+ }
}
class Getter11 {
boolean foo;
diff --git a/test/transform/resource/after-delombok/GetterBoolean.java b/test/transform/resource/after-delombok/GetterBoolean.java
index a727e49b..42b4319d 100644
--- a/test/transform/resource/after-delombok/GetterBoolean.java
+++ b/test/transform/resource/after-delombok/GetterBoolean.java
@@ -11,7 +11,7 @@ class Getter {
return this.isBar;
}
@java.lang.SuppressWarnings("all")
- public boolean hasBaz() {
+ public boolean isHasBaz() {
return this.hasBaz;
}
}
@@ -20,4 +20,14 @@ class MoreGetter {
boolean hasFoo() {
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean isFoo() {
+ return this.foo;
+ }
+}
+class YetMoreGetter {
+ boolean foo;
+ boolean getFoo() {
+ return true;
+ }
} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/SetterAccessLevel.java b/test/transform/resource/after-delombok/SetterAccessLevel.java
index dce4cc2f..45df2b35 100644
--- a/test/transform/resource/after-delombok/SetterAccessLevel.java
+++ b/test/transform/resource/after-delombok/SetterAccessLevel.java
@@ -6,19 +6,19 @@ class SetterAccessLevel {
boolean isPublic;
boolean value;
@java.lang.SuppressWarnings("all")
- private void setIsPrivate(final boolean isPrivate) {
+ private void setPrivate(final boolean isPrivate) {
this.isPrivate = isPrivate;
}
@java.lang.SuppressWarnings("all")
- void setIsPackage(final boolean isPackage) {
+ void setPackage(final boolean isPackage) {
this.isPackage = isPackage;
}
@java.lang.SuppressWarnings("all")
- protected void setIsProtected(final boolean isProtected) {
+ protected void setProtected(final boolean isProtected) {
this.isProtected = isProtected;
}
@java.lang.SuppressWarnings("all")
- public void setIsPublic(final boolean isPublic) {
+ public void setPublic(final boolean isPublic) {
this.isPublic = isPublic;
}
@java.lang.SuppressWarnings("all")
diff --git a/test/transform/resource/after-delombok/SetterAlreadyExists.java b/test/transform/resource/after-delombok/SetterAlreadyExists.java
index e4992b29..abc6d48f 100644
--- a/test/transform/resource/after-delombok/SetterAlreadyExists.java
+++ b/test/transform/resource/after-delombok/SetterAlreadyExists.java
@@ -33,3 +33,13 @@ class Setter7 {
static void setFoo() {
}
}
+class Setter8 {
+ boolean isFoo;
+ void setIsFoo() {
+ }
+}
+class Setter9 {
+ boolean isFoo;
+ void setFoo() {
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/SetterOnClass.java b/test/transform/resource/after-delombok/SetterOnClass.java
index 05528ff8..151bc179 100644
--- a/test/transform/resource/after-delombok/SetterOnClass.java
+++ b/test/transform/resource/after-delombok/SetterOnClass.java
@@ -2,7 +2,7 @@ class SetterOnClass1 {
boolean isNone;
boolean isPublic;
@java.lang.SuppressWarnings("all")
- public void setIsPublic(final boolean isPublic) {
+ public void setPublic(final boolean isPublic) {
this.isPublic = isPublic;
}
}
@@ -11,11 +11,11 @@ class SetterOnClass2 {
boolean isProtected;
boolean isPackage;
@java.lang.SuppressWarnings("all")
- protected void setIsProtected(final boolean isProtected) {
+ protected void setProtected(final boolean isProtected) {
this.isProtected = isProtected;
}
@java.lang.SuppressWarnings("all")
- void setIsPackage(final boolean isPackage) {
+ void setPackage(final boolean isPackage) {
this.isPackage = isPackage;
}
}
@@ -23,7 +23,7 @@ class SetterOnClass3 {
boolean isNone;
boolean isPackage;
@java.lang.SuppressWarnings("all")
- void setIsPackage(final boolean isPackage) {
+ void setPackage(final boolean isPackage) {
this.isPackage = isPackage;
}
}
@@ -31,7 +31,7 @@ class SetterOnClass4 {
boolean isNone;
boolean isPrivate;
@java.lang.SuppressWarnings("all")
- private void setIsPrivate(final boolean isPrivate) {
+ private void setPrivate(final boolean isPrivate) {
this.isPrivate = isPrivate;
}
}
@@ -39,7 +39,7 @@ class SetterOnClass5 {
boolean isNone;
boolean isPublic;
@java.lang.SuppressWarnings("all")
- public void setIsPublic(final boolean isPublic) {
+ public void setPublic(final boolean isPublic) {
this.isPublic = isPublic;
}
}
diff --git a/test/transform/resource/after-ecj/GetterAlreadyExists.java b/test/transform/resource/after-ecj/GetterAlreadyExists.java
index f491f147..257457bb 100644
--- a/test/transform/resource/after-ecj/GetterAlreadyExists.java
+++ b/test/transform/resource/after-ecj/GetterAlreadyExists.java
@@ -1,5 +1,8 @@
class Getter1 {
@lombok.Getter boolean foo;
+ public @java.lang.SuppressWarnings("all") boolean isFoo() {
+ return this.foo;
+ }
Getter1() {
super();
}
@@ -93,6 +96,9 @@ class Getter9 {
}
class Getter10 {
@lombok.Getter boolean foo;
+ public @java.lang.SuppressWarnings("all") boolean isFoo() {
+ return this.foo;
+ }
Getter10() {
super();
}
diff --git a/test/transform/resource/after-ecj/GetterBoolean.java b/test/transform/resource/after-ecj/GetterBoolean.java
index e9e4f370..121af119 100644
--- a/test/transform/resource/after-ecj/GetterBoolean.java
+++ b/test/transform/resource/after-ecj/GetterBoolean.java
@@ -8,7 +8,7 @@ class Getter {
public @java.lang.SuppressWarnings("all") boolean isBar() {
return this.isBar;
}
- public @java.lang.SuppressWarnings("all") boolean hasBaz() {
+ public @java.lang.SuppressWarnings("all") boolean isHasBaz() {
return this.hasBaz;
}
Getter() {
@@ -17,6 +17,9 @@ class Getter {
}
class MoreGetter {
@lombok.Getter boolean foo;
+ public @java.lang.SuppressWarnings("all") boolean isFoo() {
+ return this.foo;
+ }
MoreGetter() {
super();
}
@@ -24,3 +27,12 @@ class MoreGetter {
return true;
}
}
+class YetMoreGetter {
+ @lombok.Getter boolean foo;
+ YetMoreGetter() {
+ super();
+ }
+ boolean getFoo() {
+ return true;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/SetterAccessLevel.java b/test/transform/resource/after-ecj/SetterAccessLevel.java
index deee8213..58baac51 100644
--- a/test/transform/resource/after-ecj/SetterAccessLevel.java
+++ b/test/transform/resource/after-ecj/SetterAccessLevel.java
@@ -5,16 +5,16 @@ class SetterAccessLevel {
@lombok.Setter(lombok.AccessLevel.PROTECTED) boolean isProtected;
@lombok.Setter(lombok.AccessLevel.PUBLIC) boolean isPublic;
@lombok.Setter(value = lombok.AccessLevel.PUBLIC) boolean value;
- private @java.lang.SuppressWarnings("all") void setIsPrivate(final boolean isPrivate) {
+ private @java.lang.SuppressWarnings("all") void setPrivate(final boolean isPrivate) {
this.isPrivate = isPrivate;
}
- @java.lang.SuppressWarnings("all") void setIsPackage(final boolean isPackage) {
+ @java.lang.SuppressWarnings("all") void setPackage(final boolean isPackage) {
this.isPackage = isPackage;
}
- protected @java.lang.SuppressWarnings("all") void setIsProtected(final boolean isProtected) {
+ protected @java.lang.SuppressWarnings("all") void setProtected(final boolean isProtected) {
this.isProtected = isProtected;
}
- public @java.lang.SuppressWarnings("all") void setIsPublic(final boolean isPublic) {
+ public @java.lang.SuppressWarnings("all") void setPublic(final boolean isPublic) {
this.isPublic = isPublic;
}
public @java.lang.SuppressWarnings("all") void setValue(final boolean value) {
diff --git a/test/transform/resource/after-ecj/SetterAlreadyExists.java b/test/transform/resource/after-ecj/SetterAlreadyExists.java
index a1de2156..69983ac5 100644
--- a/test/transform/resource/after-ecj/SetterAlreadyExists.java
+++ b/test/transform/resource/after-ecj/SetterAlreadyExists.java
@@ -53,4 +53,20 @@ class Setter7 {
}
static void setFoo() {
}
+}
+class Setter8 {
+ @lombok.Setter boolean isFoo;
+ Setter8() {
+ super();
+ }
+ void setIsFoo() {
+ }
+}
+class Setter9 {
+ @lombok.Setter boolean isFoo;
+ Setter9() {
+ super();
+ }
+ void setFoo() {
+ }
} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/SetterOnClass.java b/test/transform/resource/after-ecj/SetterOnClass.java
index 084323c4..370c0335 100644
--- a/test/transform/resource/after-ecj/SetterOnClass.java
+++ b/test/transform/resource/after-ecj/SetterOnClass.java
@@ -1,7 +1,7 @@
@lombok.Setter class SetterOnClass1 {
@lombok.Setter(lombok.AccessLevel.NONE) boolean isNone;
boolean isPublic;
- public @java.lang.SuppressWarnings("all") void setIsPublic(final boolean isPublic) {
+ public @java.lang.SuppressWarnings("all") void setPublic(final boolean isPublic) {
this.isPublic = isPublic;
}
SetterOnClass1() {
@@ -12,10 +12,10 @@
@lombok.Setter(lombok.AccessLevel.NONE) boolean isNone;
boolean isProtected;
@lombok.Setter(lombok.AccessLevel.PACKAGE) boolean isPackage;
- @java.lang.SuppressWarnings("all") void setIsPackage(final boolean isPackage) {
+ @java.lang.SuppressWarnings("all") void setPackage(final boolean isPackage) {
this.isPackage = isPackage;
}
- protected @java.lang.SuppressWarnings("all") void setIsProtected(final boolean isProtected) {
+ protected @java.lang.SuppressWarnings("all") void setProtected(final boolean isProtected) {
this.isProtected = isProtected;
}
SetterOnClass2() {
@@ -25,7 +25,7 @@
@lombok.Setter(lombok.AccessLevel.PACKAGE) class SetterOnClass3 {
@lombok.Setter(lombok.AccessLevel.NONE) boolean isNone;
boolean isPackage;
- @java.lang.SuppressWarnings("all") void setIsPackage(final boolean isPackage) {
+ @java.lang.SuppressWarnings("all") void setPackage(final boolean isPackage) {
this.isPackage = isPackage;
}
SetterOnClass3() {
@@ -35,7 +35,7 @@
@lombok.Setter(lombok.AccessLevel.PRIVATE) class SetterOnClass4 {
@lombok.Setter(lombok.AccessLevel.NONE) boolean isNone;
boolean isPrivate;
- private @java.lang.SuppressWarnings("all") void setIsPrivate(final boolean isPrivate) {
+ private @java.lang.SuppressWarnings("all") void setPrivate(final boolean isPrivate) {
this.isPrivate = isPrivate;
}
SetterOnClass4() {
@@ -45,7 +45,7 @@
@lombok.Setter(lombok.AccessLevel.PUBLIC) class SetterOnClass5 {
@lombok.Setter(lombok.AccessLevel.NONE) boolean isNone;
boolean isPublic;
- public @java.lang.SuppressWarnings("all") void setIsPublic(final boolean isPublic) {
+ public @java.lang.SuppressWarnings("all") void setPublic(final boolean isPublic) {
this.isPublic = isPublic;
}
SetterOnClass5() {
diff --git a/test/transform/resource/before/GetterBoolean.java b/test/transform/resource/before/GetterBoolean.java
index 7d53ebbf..609c6635 100644
--- a/test/transform/resource/before/GetterBoolean.java
+++ b/test/transform/resource/before/GetterBoolean.java
@@ -5,8 +5,13 @@ class Getter {
}
class MoreGetter {
@lombok.Getter boolean foo;
-
boolean hasFoo() {
return true;
}
+}
+class YetMoreGetter {
+ @lombok.Getter boolean foo;
+ boolean getFoo() {
+ return true;
+ }
} \ No newline at end of file
diff --git a/test/transform/resource/before/SetterAlreadyExists.java b/test/transform/resource/before/SetterAlreadyExists.java
index a7a94123..9ac56d8a 100644
--- a/test/transform/resource/before/SetterAlreadyExists.java
+++ b/test/transform/resource/before/SetterAlreadyExists.java
@@ -33,3 +33,13 @@ class Setter7 {
static void setFoo() {
}
}
+class Setter8 {
+ @lombok.Setter boolean isFoo;
+ void setIsFoo() {
+ }
+}
+class Setter9 {
+ @lombok.Setter boolean isFoo;
+ void setFoo() {
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/messages-delombok/GetterAlreadyExists.java.messages b/test/transform/resource/messages-delombok/GetterAlreadyExists.java.messages
index 99de957b..302bbced 100644
--- a/test/transform/resource/messages-delombok/GetterAlreadyExists.java.messages
+++ b/test/transform/resource/messages-delombok/GetterAlreadyExists.java.messages
@@ -1,10 +1,8 @@
-2:9 WARNING Not generating isFoo(): A method with that name already exists (hasFoo)
8:9 WARNING Not generating isFoo(): A method with that name already exists
14:9 WARNING Not generating isFoo(): A method with that name already exists (getFoo)
32:9 WARNING Not generating getFoo(): A method with that name already exists
50:9 WARNING Not generating getFoo(): A method with that name already exists
-56:9 WARNING Not generating isFoo(): A method with that name already exists (hasFoo)
62:9 WARNING Not generating isFoo(): A method with that name already exists
68:9 WARNING Not generating isFoo(): A method with that name already exists (getFoo)
86:9 WARNING Not generating getFoo(): A method with that name already exists
-104:9 WARNING Not generating getFoo(): A method with that name already exists \ No newline at end of file
+104:9 WARNING Not generating getFoo(): A method with that name already exists
diff --git a/test/transform/resource/messages-delombok/GetterBoolean.java.messages b/test/transform/resource/messages-delombok/GetterBoolean.java.messages
index 91ba7340..3d14bcc9 100644
--- a/test/transform/resource/messages-delombok/GetterBoolean.java.messages
+++ b/test/transform/resource/messages-delombok/GetterBoolean.java.messages
@@ -1 +1 @@
-7:9 WARNING Not generating isFoo(): A method with that name already exists (hasFoo) \ No newline at end of file
+13:9 WARNING Not generating isFoo(): A method with that name already exists (getFoo) \ No newline at end of file
diff --git a/test/transform/resource/messages-delombok/SetterAlreadyExists.java.messages b/test/transform/resource/messages-delombok/SetterAlreadyExists.java.messages
index 7d0397ad..e1c0ee7d 100644
--- a/test/transform/resource/messages-delombok/SetterAlreadyExists.java.messages
+++ b/test/transform/resource/messages-delombok/SetterAlreadyExists.java.messages
@@ -1,7 +1,9 @@
-2:9 WARNING Not generating setFoo(boolean foo): A method with that name already exists
-7:9 WARNING Not generating setFoo(boolean foo): A method with that name already exists
-12:9 WARNING Not generating setFoo(String foo): A method with that name already exists
-17:9 WARNING Not generating setFoo(String foo): A method with that name already exists
-22:9 WARNING Not generating setFoo(String foo): A method with that name already exists
-27:9 WARNING Not generating setFoo(String foo): A method with that name already exists
-32:9 WARNING Not generating setFoo(String foo): A method with that name already exists
+2:9 WARNING Not generating setFoo(): A method with that name already exists
+7:9 WARNING Not generating setFoo(): A method with that name already exists
+12:9 WARNING Not generating setFoo(): A method with that name already exists
+17:9 WARNING Not generating setFoo(): A method with that name already exists
+22:9 WARNING Not generating setFoo(): A method with that name already exists
+27:9 WARNING Not generating setFoo(): A method with that name already exists
+32:9 WARNING Not generating setFoo(): A method with that name already exists
+37:9 WARNING Not generating setFoo(): A method with that name already exists (setIsFoo)
+42:9 WARNING Not generating setFoo(): A method with that name already exists
diff --git a/test/transform/resource/messages-ecj/GetterAlreadyExists.java.messages b/test/transform/resource/messages-ecj/GetterAlreadyExists.java.messages
index c811ab9a..86415168 100644
--- a/test/transform/resource/messages-ecj/GetterAlreadyExists.java.messages
+++ b/test/transform/resource/messages-ecj/GetterAlreadyExists.java.messages
@@ -1,9 +1,7 @@
-2 warning Not generating isFoo(): A method with that name already exists (hasFoo)
8 warning Not generating isFoo(): A method with that name already exists
14 warning Not generating isFoo(): A method with that name already exists (getFoo)
32 warning Not generating getFoo(): A method with that name already exists
50 warning Not generating getFoo(): A method with that name already exists
-56 warning Not generating isFoo(): A method with that name already exists (hasFoo)
62 warning Not generating isFoo(): A method with that name already exists
68 warning Not generating isFoo(): A method with that name already exists (getFoo)
86 warning Not generating getFoo(): A method with that name already exists
diff --git a/test/transform/resource/messages-ecj/GetterBoolean.java.messages b/test/transform/resource/messages-ecj/GetterBoolean.java.messages
index 23e7828c..51d9dd6e 100644
--- a/test/transform/resource/messages-ecj/GetterBoolean.java.messages
+++ b/test/transform/resource/messages-ecj/GetterBoolean.java.messages
@@ -1 +1 @@
-7 warning Not generating isFoo(): A method with that name already exists (hasFoo)
+13 warning Not generating isFoo(): A method with that name already exists (getFoo)
diff --git a/test/transform/resource/messages-ecj/SetterAlreadyExists.java.messages b/test/transform/resource/messages-ecj/SetterAlreadyExists.java.messages
index df4a9025..e82f4e6d 100644
--- a/test/transform/resource/messages-ecj/SetterAlreadyExists.java.messages
+++ b/test/transform/resource/messages-ecj/SetterAlreadyExists.java.messages
@@ -1,7 +1,9 @@
-2 warning Not generating setFoo(boolean foo): A method with that name already exists
-7 warning Not generating setFoo(boolean foo): A method with that name already exists
-12 warning Not generating setFoo(String foo): A method with that name already exists
-17 warning Not generating setFoo(String foo): A method with that name already exists
-22 warning Not generating setFoo(String foo): A method with that name already exists
-27 warning Not generating setFoo(String foo): A method with that name already exists
-32 warning Not generating setFoo(String foo): A method with that name already exists \ No newline at end of file
+2 warning Not generating setFoo(): A method with that name already exists
+7 warning Not generating setFoo(): A method with that name already exists
+12 warning Not generating setFoo(): A method with that name already exists
+17 warning Not generating setFoo(): A method with that name already exists
+22 warning Not generating setFoo(): A method with that name already exists
+27 warning Not generating setFoo(): A method with that name already exists
+32 warning Not generating setFoo(): A method with that name already exists
+37 warning Not generating setFoo(): A method with that name already exists (setIsFoo)
+42 warning Not generating setFoo(): A method with that name already exists