aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/transform/resource/after-delombok/SimpleTypeResolution.java11
-rw-r--r--test/transform/resource/after-delombok/TrickyTypeResolution.java54
-rw-r--r--test/transform/resource/after-delombok/TrickyTypeResolution2.java8
-rw-r--r--test/transform/resource/after-ecj/SimpleTypeResolution.java15
-rw-r--r--test/transform/resource/after-ecj/TrickyTypeResolution.java1
-rw-r--r--test/transform/resource/after-ecj/TrickyTypeResolution2.java1
-rw-r--r--test/transform/resource/after-eclipse/SimpleTypeResolution.java15
-rw-r--r--test/transform/resource/after-eclipse/TrickyTypeResolution.java1
-rw-r--r--test/transform/resource/after-eclipse/TrickyTypeResolution2.java1
-rw-r--r--test/transform/resource/before/SimpleTypeResolution.java7
-rw-r--r--test/transform/resource/before/TrickyTypeResolution.java49
-rw-r--r--test/transform/resource/before/TrickyTypeResolution2.java8
-rw-r--r--test/transform/resource/messages-delombok/SimpleTypeResolution.java.messages9
-rw-r--r--test/transform/resource/messages-eclipse/SimpleTypeResolution.java.messages1
-rw-r--r--test/transform/resource/messages-idempotent/SimpleTypeResolution.java.messages9
15 files changed, 190 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/SimpleTypeResolution.java b/test/transform/resource/after-delombok/SimpleTypeResolution.java
new file mode 100644
index 00000000..c6e08d70
--- /dev/null
+++ b/test/transform/resource/after-delombok/SimpleTypeResolution.java
@@ -0,0 +1,11 @@
+class SimpleTypeResolutionFail {
+ @Getter
+ private int x;
+}
+class SimpleTypeResolutionSuccess {
+ private int x;
+ @java.lang.SuppressWarnings("all")
+ public int getX() {
+ return this.x;
+ }
+}
diff --git a/test/transform/resource/after-delombok/TrickyTypeResolution.java b/test/transform/resource/after-delombok/TrickyTypeResolution.java
new file mode 100644
index 00000000..9a5aae16
--- /dev/null
+++ b/test/transform/resource/after-delombok/TrickyTypeResolution.java
@@ -0,0 +1,54 @@
+import lombok.*;
+class TrickyDoNothing {
+ @interface Getter {
+ }
+ @Getter
+ int x;
+}
+class TrickyDoNothing2 {
+ @Getter
+ int x;
+ @interface Getter {
+ }
+}
+class TrickySuccess {
+ int x;
+ @java.lang.SuppressWarnings("all")
+ public int getX() {
+ return this.x;
+ }
+}
+class TrickyDoNothing3 {
+ void test() {
+ class val {
+ }
+ val x = null;
+ }
+}
+class TrickyDoSomething {
+ void test() {
+ final java.lang.Object x = null;
+ class val {
+ }
+ }
+}
+class DoubleTrickyDoNothing {
+ void test() {
+ class val {
+ }
+ for (int i = 10; i < 20; i++) {
+ val y = null;
+ }
+ }
+}
+class DoubleTrickyDoSomething {
+ void test() {
+ for (int j = 10; j < 20; j++) {
+ class val {
+ }
+ }
+ for (int i = 10; i < 20; i++) {
+ final java.lang.Object y = null;
+ }
+ }
+}
diff --git a/test/transform/resource/after-delombok/TrickyTypeResolution2.java b/test/transform/resource/after-delombok/TrickyTypeResolution2.java
new file mode 100644
index 00000000..9118767f
--- /dev/null
+++ b/test/transform/resource/after-delombok/TrickyTypeResolution2.java
@@ -0,0 +1,8 @@
+import lombok.*;
+class DoNothingDueToTopLevel {
+ void test() {
+ val x = null;
+ }
+}
+class val {
+}
diff --git a/test/transform/resource/after-ecj/SimpleTypeResolution.java b/test/transform/resource/after-ecj/SimpleTypeResolution.java
new file mode 100644
index 00000000..a0997c67
--- /dev/null
+++ b/test/transform/resource/after-ecj/SimpleTypeResolution.java
@@ -0,0 +1,15 @@
+class SimpleTypeResolutionFail {
+ private @Getter int x;
+ SimpleTypeResolutionFail() {
+ super();
+ }
+}
+class SimpleTypeResolutionSuccess {
+ private @lombok.Getter int x;
+ public @java.lang.SuppressWarnings("all") int getX() {
+ return this.x;
+ }
+ SimpleTypeResolutionSuccess() {
+ super();
+ }
+}
diff --git a/test/transform/resource/after-ecj/TrickyTypeResolution.java b/test/transform/resource/after-ecj/TrickyTypeResolution.java
new file mode 100644
index 00000000..cb06d3c1
--- /dev/null
+++ b/test/transform/resource/after-ecj/TrickyTypeResolution.java
@@ -0,0 +1 @@
+//ignore \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/TrickyTypeResolution2.java b/test/transform/resource/after-ecj/TrickyTypeResolution2.java
new file mode 100644
index 00000000..cb06d3c1
--- /dev/null
+++ b/test/transform/resource/after-ecj/TrickyTypeResolution2.java
@@ -0,0 +1 @@
+//ignore \ No newline at end of file
diff --git a/test/transform/resource/after-eclipse/SimpleTypeResolution.java b/test/transform/resource/after-eclipse/SimpleTypeResolution.java
new file mode 100644
index 00000000..a0997c67
--- /dev/null
+++ b/test/transform/resource/after-eclipse/SimpleTypeResolution.java
@@ -0,0 +1,15 @@
+class SimpleTypeResolutionFail {
+ private @Getter int x;
+ SimpleTypeResolutionFail() {
+ super();
+ }
+}
+class SimpleTypeResolutionSuccess {
+ private @lombok.Getter int x;
+ public @java.lang.SuppressWarnings("all") int getX() {
+ return this.x;
+ }
+ SimpleTypeResolutionSuccess() {
+ super();
+ }
+}
diff --git a/test/transform/resource/after-eclipse/TrickyTypeResolution.java b/test/transform/resource/after-eclipse/TrickyTypeResolution.java
new file mode 100644
index 00000000..cb06d3c1
--- /dev/null
+++ b/test/transform/resource/after-eclipse/TrickyTypeResolution.java
@@ -0,0 +1 @@
+//ignore \ No newline at end of file
diff --git a/test/transform/resource/after-eclipse/TrickyTypeResolution2.java b/test/transform/resource/after-eclipse/TrickyTypeResolution2.java
new file mode 100644
index 00000000..cb06d3c1
--- /dev/null
+++ b/test/transform/resource/after-eclipse/TrickyTypeResolution2.java
@@ -0,0 +1 @@
+//ignore \ No newline at end of file
diff --git a/test/transform/resource/before/SimpleTypeResolution.java b/test/transform/resource/before/SimpleTypeResolution.java
new file mode 100644
index 00000000..ef5ddef2
--- /dev/null
+++ b/test/transform/resource/before/SimpleTypeResolution.java
@@ -0,0 +1,7 @@
+class SimpleTypeResolutionFail {
+ @Getter private int x;
+}
+
+class SimpleTypeResolutionSuccess {
+ @lombok.Getter private int x;
+}
diff --git a/test/transform/resource/before/TrickyTypeResolution.java b/test/transform/resource/before/TrickyTypeResolution.java
new file mode 100644
index 00000000..94d97fe0
--- /dev/null
+++ b/test/transform/resource/before/TrickyTypeResolution.java
@@ -0,0 +1,49 @@
+import lombok.*;
+class TrickyDoNothing {
+ @interface Getter {}
+ @Getter int x;
+}
+
+class TrickyDoNothing2 {
+ @Getter int x;
+ @interface Getter {}
+}
+
+class TrickySuccess {
+ @Getter int x;
+}
+
+class TrickyDoNothing3 {
+ void test() {
+ class val {}
+ val x = null;
+ }
+}
+
+class TrickyDoSomething {
+ void test() {
+ val x = null;
+ class val {}
+ }
+}
+
+class DoubleTrickyDoNothing {
+ void test() {
+ class val {}
+ for (int i = 10; i < 20; i++) {
+ val y = null;
+ }
+ }
+}
+
+class DoubleTrickyDoSomething {
+ void test() {
+ for (int j = 10; j < 20; j++) {
+ class val {}
+ }
+
+ for (int i = 10; i < 20; i++) {
+ val y = null;
+ }
+ }
+}
diff --git a/test/transform/resource/before/TrickyTypeResolution2.java b/test/transform/resource/before/TrickyTypeResolution2.java
new file mode 100644
index 00000000..00f2ac39
--- /dev/null
+++ b/test/transform/resource/before/TrickyTypeResolution2.java
@@ -0,0 +1,8 @@
+import lombok.*;
+class DoNothingDueToTopLevel {
+ void test() {
+ val x = null;
+ }
+}
+
+class val {}
diff --git a/test/transform/resource/messages-delombok/SimpleTypeResolution.java.messages b/test/transform/resource/messages-delombok/SimpleTypeResolution.java.messages
new file mode 100644
index 00000000..3a345d06
--- /dev/null
+++ b/test/transform/resource/messages-delombok/SimpleTypeResolution.java.messages
@@ -0,0 +1,9 @@
+2:10 ERROR cannot find symbol
+symbol : class Getter
+location: class SimpleTypeResolutionFail
+2:10 ERROR cannot find symbol
+symbol : class Getter
+location: class SimpleTypeResolutionFail
+2:10 ERROR cannot find symbol
+symbol : class Getter
+location: class SimpleTypeResolutionFail
diff --git a/test/transform/resource/messages-eclipse/SimpleTypeResolution.java.messages b/test/transform/resource/messages-eclipse/SimpleTypeResolution.java.messages
new file mode 100644
index 00000000..a5ad71f3
--- /dev/null
+++ b/test/transform/resource/messages-eclipse/SimpleTypeResolution.java.messages
@@ -0,0 +1 @@
+2 error Getter cannot be resolved to a type
diff --git a/test/transform/resource/messages-idempotent/SimpleTypeResolution.java.messages b/test/transform/resource/messages-idempotent/SimpleTypeResolution.java.messages
new file mode 100644
index 00000000..3a345d06
--- /dev/null
+++ b/test/transform/resource/messages-idempotent/SimpleTypeResolution.java.messages
@@ -0,0 +1,9 @@
+2:10 ERROR cannot find symbol
+symbol : class Getter
+location: class SimpleTypeResolutionFail
+2:10 ERROR cannot find symbol
+symbol : class Getter
+location: class SimpleTypeResolutionFail
+2:10 ERROR cannot find symbol
+symbol : class Getter
+location: class SimpleTypeResolutionFail