aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/ValFinal.java5
-rw-r--r--test/transform/resource/after-delombok/ValInLambda.java18
-rw-r--r--test/transform/resource/after-ecj/ValFinal.java9
-rw-r--r--test/transform/resource/after-ecj/ValInLambda.java21
-rw-r--r--test/transform/resource/before/ValFinal.java6
-rw-r--r--test/transform/resource/before/ValInLambda.java21
6 files changed, 80 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ValFinal.java b/test/transform/resource/after-delombok/ValFinal.java
new file mode 100644
index 00000000..d35ca713
--- /dev/null
+++ b/test/transform/resource/after-delombok/ValFinal.java
@@ -0,0 +1,5 @@
+public class ValFinal {
+ public void test() {
+ final int x = 10;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/ValInLambda.java b/test/transform/resource/after-delombok/ValInLambda.java
new file mode 100644
index 00000000..7ce1e1b4
--- /dev/null
+++ b/test/transform/resource/after-delombok/ValInLambda.java
@@ -0,0 +1,18 @@
+// version 8:
+class ValInLambda {
+ Runnable foo = (Runnable) () -> {
+ final int i = 1;
+ };
+
+ public void easyLambda() {
+ Runnable foo = (Runnable) () -> {
+ final int i = 1;
+ };
+ }
+
+ public void easyIntersectionLambda() {
+ Runnable foo = (Runnable) () -> {
+ final int i = 1;
+ };
+ }
+}
diff --git a/test/transform/resource/after-ecj/ValFinal.java b/test/transform/resource/after-ecj/ValFinal.java
new file mode 100644
index 00000000..d7cf9cb7
--- /dev/null
+++ b/test/transform/resource/after-ecj/ValFinal.java
@@ -0,0 +1,9 @@
+import lombok.val;
+public class ValFinal {
+ public ValFinal() {
+ super();
+ }
+ public void test() {
+ final @val int x = 10;
+ }
+}
diff --git a/test/transform/resource/after-ecj/ValInLambda.java b/test/transform/resource/after-ecj/ValInLambda.java
new file mode 100644
index 00000000..7669789b
--- /dev/null
+++ b/test/transform/resource/after-ecj/ValInLambda.java
@@ -0,0 +1,21 @@
+// version 8:
+
+import lombok.val;
+class ValInLambda {
+ Runnable foo = (Runnable) () -> {
+ final @val int i = 1;
+};
+ ValInLambda() {
+ super();
+ }
+ public void easyLambda() {
+ Runnable foo = (Runnable) () -> {
+ final @val int i = 1;
+};
+ }
+ public void easyIntersectionLambda() {
+ Runnable foo = (Runnable) () -> {
+ final @val int i = 1;
+};
+ }
+}
diff --git a/test/transform/resource/before/ValFinal.java b/test/transform/resource/before/ValFinal.java
new file mode 100644
index 00000000..3c5af366
--- /dev/null
+++ b/test/transform/resource/before/ValFinal.java
@@ -0,0 +1,6 @@
+import lombok.val;
+public class ValFinal {
+ public void test() {
+ final val x = 10;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/ValInLambda.java b/test/transform/resource/before/ValInLambda.java
new file mode 100644
index 00000000..2c2a5942
--- /dev/null
+++ b/test/transform/resource/before/ValInLambda.java
@@ -0,0 +1,21 @@
+// version 8:
+
+import lombok.val;
+
+class ValInLambda {
+ Runnable foo = (Runnable) () -> {
+ val i = 1;
+ };
+
+ public void easyLambda() {
+ Runnable foo = (Runnable) () -> {
+ val i = 1;
+ };
+ }
+
+ public void easyIntersectionLambda() {
+ Runnable foo = (Runnable) () -> {
+ val i = 1;
+ };
+ }
+}