aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-08-13 00:11:22 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-08-13 00:11:22 +0200
commit6e25b00acec26c770236d347a879a899c5c930db (patch)
treecb3d7be46b6bf1dd4662f08f4393368297b78e3f /test/transform
parent8850798a04e7f44925ed16b3450623b02f5b6295 (diff)
downloadlombok-6e25b00acec26c770236d347a879a899c5c930db.tar.gz
lombok-6e25b00acec26c770236d347a879a899c5c930db.tar.bz2
lombok-6e25b00acec26c770236d347a879a899c5c930db.zip
test for using 'val' on an expression that involved lombok-generated code.
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/MixGetterVal.java13
-rw-r--r--test/transform/resource/after-ecj/MixGetterVal.java17
-rw-r--r--test/transform/resource/before/MixGetterVal.java12
3 files changed, 42 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/MixGetterVal.java b/test/transform/resource/after-delombok/MixGetterVal.java
new file mode 100644
index 00000000..7662608b
--- /dev/null
+++ b/test/transform/resource/after-delombok/MixGetterVal.java
@@ -0,0 +1,13 @@
+class MixGetterVal {
+ private int x;
+ public void m(int z) {
+ }
+ public void test() {
+ final int y = x;
+ m(y);
+ }
+ @java.lang.SuppressWarnings("all")
+ public int getX() {
+ return this.x;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/MixGetterVal.java b/test/transform/resource/after-ecj/MixGetterVal.java
new file mode 100644
index 00000000..45fcf989
--- /dev/null
+++ b/test/transform/resource/after-ecj/MixGetterVal.java
@@ -0,0 +1,17 @@
+import lombok.Getter;
+import lombok.val;
+class MixGetterVal {
+ private @Getter int x;
+ MixGetterVal() {
+ super();
+ }
+ public void m(int z) {
+ }
+ public void test() {
+ final @val int y = x;
+ m(y);
+ }
+ public @java.lang.SuppressWarnings("all") int getX() {
+ return this.x;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/MixGetterVal.java b/test/transform/resource/before/MixGetterVal.java
new file mode 100644
index 00000000..f80d2927
--- /dev/null
+++ b/test/transform/resource/before/MixGetterVal.java
@@ -0,0 +1,12 @@
+import lombok.Getter;
+import lombok.val;
+
+class MixGetterVal {
+ @Getter private int x;
+
+ public void m(int z) {}
+ public void test() {
+ val y = x;
+ m(y);
+ }
+}