diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-03-26 23:49:39 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-03-26 23:49:39 +0200 |
commit | e98d226cfb9a4b76b12e38e8ac590fb6c6ebbacc (patch) | |
tree | b9783fd8b03bd49244d7f43cc53f1c22972d33ea /test/transform/resource/before | |
parent | 7ddafc0fe573b0d97a4bf27d42caccad695af996 (diff) | |
download | lombok-e98d226cfb9a4b76b12e38e8ac590fb6c6ebbacc.tar.gz lombok-e98d226cfb9a4b76b12e38e8ac590fb6c6ebbacc.tar.bz2 lombok-e98d226cfb9a4b76b12e38e8ac590fb6c6ebbacc.zip |
Added full test suite for @Accessors, as well as the new rules for whether or not a method is already there so lombok shouldn't generate it (now number of parameters matters), and added generics testing to RequiredArgsConstructor's static constructor feature.
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r-- | test/transform/resource/before/Accessors.java | 12 | ||||
-rw-r--r-- | test/transform/resource/before/Constructors.java | 6 | ||||
-rw-r--r-- | test/transform/resource/before/SetterAlreadyExists.java | 6 |
3 files changed, 20 insertions, 4 deletions
diff --git a/test/transform/resource/before/Accessors.java b/test/transform/resource/before/Accessors.java index 18547620..3ef8a02f 100644 --- a/test/transform/resource/before/Accessors.java +++ b/test/transform/resource/before/Accessors.java @@ -35,4 +35,16 @@ class AccessorsPrefix3 { private String getName() { return fName; } +} + +class AccessorsFluentGenerics<T extends Number> { + @lombok.Setter @lombok.experimental.Accessors(fluent=true) private String name; +} + +class AccessorsFluentNoChaining { + @lombok.Setter @lombok.experimental.Accessors(fluent=true,chain=false) private String name; +} + +class AccessorsFluentStatic<T extends Number> { + @lombok.Setter @lombok.experimental.Accessors(fluent=true) private static String name; }
\ No newline at end of file diff --git a/test/transform/resource/before/Constructors.java b/test/transform/resource/before/Constructors.java index 6ac228d6..272fa850 100644 --- a/test/transform/resource/before/Constructors.java +++ b/test/transform/resource/before/Constructors.java @@ -17,4 +17,8 @@ @lombok.NoArgsConstructor class NoArgsConstructor1 { int x; String name; -}
\ No newline at end of file +} +@lombok.RequiredArgsConstructor(staticName="of") class RequiredArgsConstructorStaticNameGenerics<T extends Number> { + final T x; + String name; +} diff --git a/test/transform/resource/before/SetterAlreadyExists.java b/test/transform/resource/before/SetterAlreadyExists.java index 9ac56d8a..8d995b39 100644 --- a/test/transform/resource/before/SetterAlreadyExists.java +++ b/test/transform/resource/before/SetterAlreadyExists.java @@ -30,16 +30,16 @@ class Setter6 { } class Setter7 { @lombok.Setter String foo; - static void setFoo() { + void setFoo(String foo, Object... x) { } } class Setter8 { @lombok.Setter boolean isFoo; - void setIsFoo() { + void setIsFoo(boolean foo) { } } class Setter9 { @lombok.Setter boolean isFoo; - void setFoo() { + void setFoo(boolean foo) { } }
\ No newline at end of file |