Testcases updated with new behaviour of @Getter/@Setter on booleans.

This commit is contained in:
Reinier Zwitserloot committed 2011-02-07 21:35:34 +01:00
1 parent c98cec7d2d
commit 30b63deaff
18 files changed
+121 -44

No files matched your search

@@ -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;
@@ -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;
}
}
@@ -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")
@@ -33,3 +33,13 @@ class Setter7 {
static void setFoo() {
}
}
class Setter8 {
boolean isFoo;
void setIsFoo() {
}
}
class Setter9 {
boolean isFoo;
void setFoo() {
}
}
@@ -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;
}
}
@@ -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();
}
@@ -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;
}
}
@@ -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) {
@@ -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() {
}
}
@@ -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() {
@@ -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;
}
}
@@ -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() {
}
}
@@ -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
104:9 WARNING Not generating getFoo(): A method with that name already exists
@@ -1 +1 @@
7:9 WARNING Not generating isFoo(): A method with that name already exists (hasFoo)
13:9 WARNING Not generating isFoo(): A method with that name already exists (getFoo)
@@ -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
@@ -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
@@ -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)
@@ -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
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