From ffb78b6af6e4ba1426de1bcfc36f43521026e39e Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Sat, 28 Nov 2009 23:30:10 +0100 Subject: Added more Getter-tests --- test/lombok/resource/after/GetterAccessLevel.java | 19 +++++++ .../lombok/resource/after/GetterAlreadyExists.java | 66 ++++++++++++++++++++++ test/lombok/resource/after/GetterBoolean.java | 20 +++++++ test/lombok/resource/after/GetterPlain.java | 10 ++++ test/lombok/resource/after/PlainGetter.java | 10 ---- test/lombok/resource/before/GetterAccessLevel.java | 12 ++++ .../resource/before/GetterAlreadyExists.java | 54 ++++++++++++++++++ test/lombok/resource/before/GetterBoolean.java | 12 ++++ test/lombok/resource/before/GetterPlain.java | 6 ++ test/lombok/resource/before/PlainGetter.java | 6 -- 10 files changed, 199 insertions(+), 16 deletions(-) create mode 100644 test/lombok/resource/after/GetterAccessLevel.java create mode 100644 test/lombok/resource/after/GetterAlreadyExists.java create mode 100644 test/lombok/resource/after/GetterBoolean.java create mode 100644 test/lombok/resource/after/GetterPlain.java delete mode 100644 test/lombok/resource/after/PlainGetter.java create mode 100644 test/lombok/resource/before/GetterAccessLevel.java create mode 100644 test/lombok/resource/before/GetterAlreadyExists.java create mode 100644 test/lombok/resource/before/GetterBoolean.java create mode 100644 test/lombok/resource/before/GetterPlain.java delete mode 100644 test/lombok/resource/before/PlainGetter.java diff --git a/test/lombok/resource/after/GetterAccessLevel.java b/test/lombok/resource/after/GetterAccessLevel.java new file mode 100644 index 00000000..eec84e85 --- /dev/null +++ b/test/lombok/resource/after/GetterAccessLevel.java @@ -0,0 +1,19 @@ +class Getter { + boolean isNone; + boolean isPrivate; + boolean isPackage; + boolean isProtected; + boolean isPublic; + private boolean isPrivate() { + return isPrivate; + } + boolean isPackage() { + return isPackage; + } + protected boolean isProtected() { + return isProtected; + } + public boolean isPublic() { + return isPublic; + } +} diff --git a/test/lombok/resource/after/GetterAlreadyExists.java b/test/lombok/resource/after/GetterAlreadyExists.java new file mode 100644 index 00000000..152cb372 --- /dev/null +++ b/test/lombok/resource/after/GetterAlreadyExists.java @@ -0,0 +1,66 @@ +class Getter1 { + boolean foo; + boolean hasFoo() { + return true; + } +} +class Getter2 { + boolean foo; + boolean isFoo() { + return true; + } +} +class Getter3 { + boolean foo; + boolean getFoo() { + return true; + } +} +class Getter4 { + String foo; + String hasFoo() { + return null; + } + public String getFoo() { + return foo; + } +} +class Getter5 { + String foo; + String isFoo() { + return null; + } + public String getFoo() { + return foo; + } +} +class Getter6 { + String foo; + String getFoo() { + return null; + } +} +class Getter7 { + String foo; + boolean hasFoo() { + return false; + } + public String getFoo() { + return foo; + } +} +class Getter8 { + String foo; + boolean isFoo() { + return false; + } + public String getFoo() { + return foo; + } +} +class Getter9 { + String foo; + boolean getFoo() { + return false; + } +} \ No newline at end of file diff --git a/test/lombok/resource/after/GetterBoolean.java b/test/lombok/resource/after/GetterBoolean.java new file mode 100644 index 00000000..639d6dc9 --- /dev/null +++ b/test/lombok/resource/after/GetterBoolean.java @@ -0,0 +1,20 @@ +class Getter { + boolean foo; + boolean isBar; + boolean hasBaz; + public boolean isFoo() { + return foo; + } + public boolean isBar() { + return isBar; + } + public boolean hasBaz() { + return hasBaz; + } +} +class MoreGetter { + boolean foo; + boolean hasFoo() { + return true; + } +} \ No newline at end of file diff --git a/test/lombok/resource/after/GetterPlain.java b/test/lombok/resource/after/GetterPlain.java new file mode 100644 index 00000000..04944df8 --- /dev/null +++ b/test/lombok/resource/after/GetterPlain.java @@ -0,0 +1,10 @@ +class Getter { + int i; + int foo; + public int getI() { + return i; + } + public int getFoo() { + return foo; + } +} \ No newline at end of file diff --git a/test/lombok/resource/after/PlainGetter.java b/test/lombok/resource/after/PlainGetter.java deleted file mode 100644 index 04944df8..00000000 --- a/test/lombok/resource/after/PlainGetter.java +++ /dev/null @@ -1,10 +0,0 @@ -class Getter { - int i; - int foo; - public int getI() { - return i; - } - public int getFoo() { - return foo; - } -} \ No newline at end of file diff --git a/test/lombok/resource/before/GetterAccessLevel.java b/test/lombok/resource/before/GetterAccessLevel.java new file mode 100644 index 00000000..8fd9bcc7 --- /dev/null +++ b/test/lombok/resource/before/GetterAccessLevel.java @@ -0,0 +1,12 @@ +class Getter { + @lombok.Getter(lombok.AccessLevel.NONE) + boolean isNone; + @lombok.Getter(lombok.AccessLevel.PRIVATE) + boolean isPrivate; + @lombok.Getter(lombok.AccessLevel.PACKAGE) + boolean isPackage; + @lombok.Getter(lombok.AccessLevel.PROTECTED) + boolean isProtected; + @lombok.Getter(lombok.AccessLevel.PUBLIC) + boolean isPublic; +} diff --git a/test/lombok/resource/before/GetterAlreadyExists.java b/test/lombok/resource/before/GetterAlreadyExists.java new file mode 100644 index 00000000..3a22ed36 --- /dev/null +++ b/test/lombok/resource/before/GetterAlreadyExists.java @@ -0,0 +1,54 @@ +class Getter1 { + @lombok.Getter boolean foo; + boolean hasFoo() { + return true; + } +} +class Getter2 { + @lombok.Getter boolean foo; + boolean isFoo() { + return true; + } +} +class Getter3 { + @lombok.Getter boolean foo; + boolean getFoo() { + return true; + } +} +class Getter4 { + @lombok.Getter String foo; + String hasFoo() { + return null; + } +} +class Getter5 { + @lombok.Getter String foo; + String isFoo() { + return null; + } +} +class Getter6 { + @lombok.Getter String foo; + String getFoo() { + return null; + } +} +class Getter7 { + @lombok.Getter String foo; + boolean hasFoo() { + return false; + } +} +class Getter8 { + @lombok.Getter String foo; + boolean isFoo() { + return false; + } +} +class Getter9 { + @lombok.Getter String foo; + boolean getFoo() { + return false; + } +} \ No newline at end of file diff --git a/test/lombok/resource/before/GetterBoolean.java b/test/lombok/resource/before/GetterBoolean.java new file mode 100644 index 00000000..7d53ebbf --- /dev/null +++ b/test/lombok/resource/before/GetterBoolean.java @@ -0,0 +1,12 @@ +class Getter { + @lombok.Getter boolean foo; + @lombok.Getter boolean isBar; + @lombok.Getter boolean hasBaz; +} +class MoreGetter { + @lombok.Getter boolean foo; + + boolean hasFoo() { + return true; + } +} \ No newline at end of file diff --git a/test/lombok/resource/before/GetterPlain.java b/test/lombok/resource/before/GetterPlain.java new file mode 100644 index 00000000..e3baf5ae --- /dev/null +++ b/test/lombok/resource/before/GetterPlain.java @@ -0,0 +1,6 @@ +import lombok.Getter; + +class Getter { + @lombok.Getter int i; + @Getter int foo; +} \ No newline at end of file diff --git a/test/lombok/resource/before/PlainGetter.java b/test/lombok/resource/before/PlainGetter.java deleted file mode 100644 index 2db1ee13..00000000 --- a/test/lombok/resource/before/PlainGetter.java +++ /dev/null @@ -1,6 +0,0 @@ -import lombok.Getter; - -class Getter { - @Getter int i; - @lombok.Getter int foo; -} \ No newline at end of file -- cgit