aboutsummaryrefslogtreecommitdiff
path: root/test/delombok
diff options
context:
space:
mode:
Diffstat (limited to 'test/delombok')
-rw-r--r--test/delombok/resource/after/Annotation.java9
-rw-r--r--test/delombok/resource/after/Cast.java6
-rw-r--r--test/delombok/resource/after/CleanupName.java10
-rw-r--r--test/delombok/resource/after/CleanupPlain.java18
-rw-r--r--test/delombok/resource/after/CommentsInterspersed.java15
-rw-r--r--test/delombok/resource/after/ForEach.java9
-rw-r--r--test/delombok/resource/after/ForLoop.java11
-rw-r--r--test/delombok/resource/after/GetterAccessLevel.java19
-rw-r--r--test/delombok/resource/after/GetterAlreadyExists.java132
-rw-r--r--test/delombok/resource/after/GetterBoolean.java20
-rw-r--r--test/delombok/resource/after/GetterPlain.java10
-rw-r--r--test/delombok/resource/after/NonNullPlain.java25
-rw-r--r--test/delombok/resource/after/SetterAccessLevel.java19
-rw-r--r--test/delombok/resource/after/SetterAlreadyExists.java35
-rw-r--r--test/delombok/resource/after/SetterPlain.java10
-rw-r--r--test/delombok/resource/after/SynchronizedName.java20
-rw-r--r--test/delombok/resource/after/SynchronizedPlain.java26
-rw-r--r--test/delombok/resource/after/WithComments.java5
-rw-r--r--test/delombok/resource/anttest.xml13
-rw-r--r--test/delombok/resource/before/Annotation.java9
-rw-r--r--test/delombok/resource/before/Cast.java6
-rw-r--r--test/delombok/resource/before/CleanupName.java6
-rw-r--r--test/delombok/resource/before/CleanupPlain.java11
-rw-r--r--test/delombok/resource/before/CommentsInterspersed.java17
-rw-r--r--test/delombok/resource/before/ForEach.java9
-rw-r--r--test/delombok/resource/before/ForLoop.java12
-rw-r--r--test/delombok/resource/before/GetterAccessLevel.java12
-rw-r--r--test/delombok/resource/before/GetterAlreadyExists.java108
-rw-r--r--test/delombok/resource/before/GetterBoolean.java12
-rw-r--r--test/delombok/resource/before/GetterPlain.java5
-rw-r--r--test/delombok/resource/before/NonNullPlain.java11
-rw-r--r--test/delombok/resource/before/SetterAccessLevel.java12
-rw-r--r--test/delombok/resource/before/SetterAlreadyExists.java35
-rw-r--r--test/delombok/resource/before/SetterPlain.java5
-rw-r--r--test/delombok/resource/before/SynchronizedName.java18
-rw-r--r--test/delombok/resource/before/SynchronizedPlain.java17
-rw-r--r--test/delombok/resource/before/WithComments.java5
-rw-r--r--test/delombok/src/lombok/delombok/TestLombokFiles.java4
-rw-r--r--test/delombok/src/lombok/delombok/TestLombokFilesIdempotent.java2
-rw-r--r--test/delombok/src/lombok/delombok/TestSourceFiles.java4
40 files changed, 633 insertions, 99 deletions
diff --git a/test/delombok/resource/after/Annotation.java b/test/delombok/resource/after/Annotation.java
deleted file mode 100644
index 006af03e..00000000
--- a/test/delombok/resource/after/Annotation.java
+++ /dev/null
@@ -1,9 +0,0 @@
-@SuppressWarnings("all")
-class Annotation {
- @Override
- public String toString() {
- return super.toString();
- }
- public void method(@SuppressWarnings("unused") int x) {
- }
-} \ No newline at end of file
diff --git a/test/delombok/resource/after/Cast.java b/test/delombok/resource/after/Cast.java
deleted file mode 100644
index 95237b0f..00000000
--- a/test/delombok/resource/after/Cast.java
+++ /dev/null
@@ -1,6 +0,0 @@
-import java.util.*;
-public class Cast {
- public void test(List<?> list) {
- RandomAccess r = (/*before*/ RandomAccess /*after*/)list;
- }
-} \ No newline at end of file
diff --git a/test/delombok/resource/after/CleanupName.java b/test/delombok/resource/after/CleanupName.java
new file mode 100644
index 00000000..26997372
--- /dev/null
+++ b/test/delombok/resource/after/CleanupName.java
@@ -0,0 +1,10 @@
+class Cleanup {
+ void test() throws Exception {
+ Object o = "Hello World!";
+ try {
+ System.out.println(o);
+ } finally {
+ o.toString();
+ }
+ }
+}
diff --git a/test/delombok/resource/after/CleanupPlain.java b/test/delombok/resource/after/CleanupPlain.java
new file mode 100644
index 00000000..35d51543
--- /dev/null
+++ b/test/delombok/resource/after/CleanupPlain.java
@@ -0,0 +1,18 @@
+import java.io.*;
+class CleanupPlain {
+ void test() throws Exception {
+ InputStream in = new FileInputStream("in");
+ try {
+ OutputStream out = new FileOutputStream("out");
+ try {
+ if (in.markSupported()) {
+ out.flush();
+ }
+ } finally {
+ out.close();
+ }
+ } finally {
+ in.close();
+ }
+ }
+}
diff --git a/test/delombok/resource/after/CommentsInterspersed.java b/test/delombok/resource/after/CommentsInterspersed.java
new file mode 100644
index 00000000..ddc716c9
--- /dev/null
+++ b/test/delombok/resource/after/CommentsInterspersed.java
@@ -0,0 +1,15 @@
+/* cmt *//* cmt2 */ /* cmt3 */ /*bla */
+public class CommentsInterspersed {
+ /** javadoc for field */
+ private int x;
+ /* bla2 */ private String test = "foo"; //$NON-NLS-1$
+ /** Javadoc on method */
+ public native void gwtTest(); /*-{
+ javascript;
+ }-*/
+ public String getTest() {
+ return test;
+ }
+} //haha!
+//hahaha!
+//hahahaha!
diff --git a/test/delombok/resource/after/ForEach.java b/test/delombok/resource/after/ForEach.java
deleted file mode 100644
index c4d4a9dc..00000000
--- a/test/delombok/resource/after/ForEach.java
+++ /dev/null
@@ -1,9 +0,0 @@
-import java.util.Arrays;
-public class ForEach {
- {
- for (int i : Arrays.asList(1, 2, 3)) {
- System.out.println(i);
- // Do something
- }
- }
-}
diff --git a/test/delombok/resource/after/ForLoop.java b/test/delombok/resource/after/ForLoop.java
deleted file mode 100644
index 615f6e8a..00000000
--- a/test/delombok/resource/after/ForLoop.java
+++ /dev/null
@@ -1,11 +0,0 @@
-public class ForLoop {
- public static void main(String[] args) {
- // before loop
- for (int i = 0; i < 10; i++) {
- // start of block
- System.out.println(i);
- // end of block
- }
- // after loop
- }
-}
diff --git a/test/delombok/resource/after/GetterAccessLevel.java b/test/delombok/resource/after/GetterAccessLevel.java
new file mode 100644
index 00000000..eec84e85
--- /dev/null
+++ b/test/delombok/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/delombok/resource/after/GetterAlreadyExists.java b/test/delombok/resource/after/GetterAlreadyExists.java
new file mode 100644
index 00000000..fce1ba41
--- /dev/null
+++ b/test/delombok/resource/after/GetterAlreadyExists.java
@@ -0,0 +1,132 @@
+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;
+ }
+}
+class Getter10 {
+ boolean foo;
+ static boolean hasFoo() {
+ return false;
+ }
+}
+class Getter11 {
+ boolean foo;
+ static boolean isFoo() {
+ return false;
+ }
+}
+class Getter12 {
+ boolean foo;
+ static boolean getFoo() {
+ return false;
+ }
+}
+class Getter13 {
+ String foo;
+ static boolean hasFoo() {
+ return false;
+ }
+ public String getFoo() {
+ return foo;
+ }
+}
+class Getter14 {
+ String foo;
+ static boolean isFoo() {
+ return false;
+ }
+ public String getFoo() {
+ return foo;
+ }
+}
+class Getter15 {
+ String foo;
+ static boolean getFoo() {
+ return false;
+ }
+}
+class Getter16 {
+ String foo;
+ static String hasFoo() {
+ return false;
+ }
+ public String getFoo() {
+ return foo;
+ }
+}
+class Getter17 {
+ String foo;
+ static String isFoo() {
+ return false;
+ }
+ public String getFoo() {
+ return foo;
+ }
+}
+class Getter18 {
+ String foo;
+ static String getFoo() {
+ return false;
+ }
+} \ No newline at end of file
diff --git a/test/delombok/resource/after/GetterBoolean.java b/test/delombok/resource/after/GetterBoolean.java
new file mode 100644
index 00000000..639d6dc9
--- /dev/null
+++ b/test/delombok/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/delombok/resource/after/GetterPlain.java b/test/delombok/resource/after/GetterPlain.java
new file mode 100644
index 00000000..5e8cc965
--- /dev/null
+++ b/test/delombok/resource/after/GetterPlain.java
@@ -0,0 +1,10 @@
+class GetterPlain {
+ int i;
+ int foo;
+ public int getI() {
+ return i;
+ }
+ public int getFoo() {
+ return foo;
+ }
+} \ No newline at end of file
diff --git a/test/delombok/resource/after/NonNullPlain.java b/test/delombok/resource/after/NonNullPlain.java
new file mode 100644
index 00000000..2d7ebb4f
--- /dev/null
+++ b/test/delombok/resource/after/NonNullPlain.java
@@ -0,0 +1,25 @@
+class NonNullPlain {
+ @lombok.NonNull
+ int i;
+ @lombok.NonNull
+ String s;
+
+ @lombok.NonNull
+ public int getI() {
+ return i;
+ }
+
+ public void setI(@lombok.NonNull final int i) {
+ this.i = i;
+ }
+
+ @lombok.NonNull
+ public String getS() {
+ return s;
+ }
+
+ public void setS(@lombok.NonNull final String s) {
+ if (s == null) throw new java.lang.NullPointerException("s");
+ this.s = s;
+ }
+}
diff --git a/test/delombok/resource/after/SetterAccessLevel.java b/test/delombok/resource/after/SetterAccessLevel.java
new file mode 100644
index 00000000..95179bac
--- /dev/null
+++ b/test/delombok/resource/after/SetterAccessLevel.java
@@ -0,0 +1,19 @@
+class Setter {
+ boolean isNone;
+ boolean isPrivate;
+ boolean isPackage;
+ boolean isProtected;
+ boolean isPublic;
+ private void setIsPrivate(final boolean isPrivate) {
+ this.isPrivate = isPrivate;
+ }
+ void setIsPackage(final boolean isPackage) {
+ this.isPackage = isPackage;
+ }
+ protected void setIsProtected(final boolean isProtected) {
+ this.isProtected = isProtected;
+ }
+ public void setIsPublic(final boolean isPublic) {
+ this.isPublic = isPublic;
+ }
+}
diff --git a/test/delombok/resource/after/SetterAlreadyExists.java b/test/delombok/resource/after/SetterAlreadyExists.java
new file mode 100644
index 00000000..e4992b29
--- /dev/null
+++ b/test/delombok/resource/after/SetterAlreadyExists.java
@@ -0,0 +1,35 @@
+class Setter1 {
+ boolean foo;
+ void setFoo(boolean foo) {
+ }
+}
+class Setter2 {
+ boolean foo;
+ void setFoo(String foo) {
+ }
+}
+class Setter3 {
+ String foo;
+ void setFoo(boolean foo) {
+ }
+}
+class Setter4 {
+ String foo;
+ void setFoo(String foo) {
+ }
+}
+class Setter5 {
+ String foo;
+ void setFoo() {
+ }
+}
+class Setter6 {
+ String foo;
+ void setFoo(String foo, int x) {
+ }
+}
+class Setter7 {
+ String foo;
+ static void setFoo() {
+ }
+}
diff --git a/test/delombok/resource/after/SetterPlain.java b/test/delombok/resource/after/SetterPlain.java
new file mode 100644
index 00000000..8faad0ec
--- /dev/null
+++ b/test/delombok/resource/after/SetterPlain.java
@@ -0,0 +1,10 @@
+class SetterPlain {
+ int i;
+ int foo;
+ public void setI(final int i) {
+ this.i = i;
+ }
+ public void setFoo(final int foo) {
+ this.foo = foo;
+ }
+} \ No newline at end of file
diff --git a/test/delombok/resource/after/SynchronizedName.java b/test/delombok/resource/after/SynchronizedName.java
new file mode 100644
index 00000000..a3e64796
--- /dev/null
+++ b/test/delombok/resource/after/SynchronizedName.java
@@ -0,0 +1,20 @@
+class SynchronizedName {
+ private Object read = new Object();
+ private static Object READ = new Object();
+ void test1() {
+ synchronized (read) {
+ System.out.println("one");
+ }
+ }
+ void test2() {
+ System.out.println("two");
+ }
+ static void test3() {
+ System.out.println("three");
+ }
+ void test4() {
+ synchronized (READ) {
+ System.out.println("four");
+ }
+ }
+}
diff --git a/test/delombok/resource/after/SynchronizedPlain.java b/test/delombok/resource/after/SynchronizedPlain.java
new file mode 100644
index 00000000..fcbe03f2
--- /dev/null
+++ b/test/delombok/resource/after/SynchronizedPlain.java
@@ -0,0 +1,26 @@
+class SynchronizedPlain1 {
+ void test() {
+ synchronized ($lock) {
+ System.out.println("one");
+ }
+ }
+ void test2() {
+ synchronized ($lock) {
+ System.out.println("two");
+ }
+ }
+ private final java.lang.Object $lock = new java.lang.Object[0];
+}
+class SynchronizedPlain2 {
+ static void test() {
+ synchronized ($LOCK) {
+ System.out.println("three");
+ }
+ }
+ static void test2() {
+ synchronized ($LOCK) {
+ System.out.println("four");
+ }
+ }
+ private static final java.lang.Object $LOCK = new java.lang.Object[0];
+} \ No newline at end of file
diff --git a/test/delombok/resource/after/WithComments.java b/test/delombok/resource/after/WithComments.java
deleted file mode 100644
index e4f078aa..00000000
--- a/test/delombok/resource/after/WithComments.java
+++ /dev/null
@@ -1,5 +0,0 @@
-// Cool Comments
-public class WithComments {
- // Also inside the body
-// On start of line
-} \ No newline at end of file
diff --git a/test/delombok/resource/anttest.xml b/test/delombok/resource/anttest.xml
deleted file mode 100644
index 4372e094..00000000
--- a/test/delombok/resource/anttest.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<project name="testDelombokAntTask" basedir="../../.." default="test">
- <taskdef classname="lombok.delombok.ant.DelombokTask" classpath="dist/lombok.jar" name="delombok" />
- <target name="test">
- <mkdir dir="build/testResult" />
- <delombok verbose="true" encoding="UTF-8" to="build/testResult">
- <fileset dir="test/lombok/resource" />
- <fileset dir="test/delombok/resource" />
- </delombok>
- </target>
- <target name="clean">
- <delete quiet="true" dir="build/testResult" />
- </target>
-</project>
diff --git a/test/delombok/resource/before/Annotation.java b/test/delombok/resource/before/Annotation.java
deleted file mode 100644
index 297dd793..00000000
--- a/test/delombok/resource/before/Annotation.java
+++ /dev/null
@@ -1,9 +0,0 @@
-@SuppressWarnings("all")
-class Annotation {
- @Override
- public String toString() {
- return super.toString();
- }
- public void method(@SuppressWarnings("unused") int x) {
- }
-}
diff --git a/test/delombok/resource/before/Cast.java b/test/delombok/resource/before/Cast.java
deleted file mode 100644
index 95237b0f..00000000
--- a/test/delombok/resource/before/Cast.java
+++ /dev/null
@@ -1,6 +0,0 @@
-import java.util.*;
-public class Cast {
- public void test(List<?> list) {
- RandomAccess r = (/*before*/ RandomAccess /*after*/)list;
- }
-} \ No newline at end of file
diff --git a/test/delombok/resource/before/CleanupName.java b/test/delombok/resource/before/CleanupName.java
new file mode 100644
index 00000000..0d253f1e
--- /dev/null
+++ b/test/delombok/resource/before/CleanupName.java
@@ -0,0 +1,6 @@
+class Cleanup {
+ void test() throws Exception {
+ @lombok.Cleanup("toString") Object o = "Hello World!";
+ System.out.println(o);
+ }
+} \ No newline at end of file
diff --git a/test/delombok/resource/before/CleanupPlain.java b/test/delombok/resource/before/CleanupPlain.java
new file mode 100644
index 00000000..a91ac3c1
--- /dev/null
+++ b/test/delombok/resource/before/CleanupPlain.java
@@ -0,0 +1,11 @@
+import lombok.Cleanup;
+import java.io.*;
+class CleanupPlain {
+ void test() throws Exception {
+ @lombok.Cleanup InputStream in = new FileInputStream("in");
+ @Cleanup OutputStream out = new FileOutputStream("out");
+ if (in.markSupported()) {
+ out.flush();
+ }
+ }
+} \ No newline at end of file
diff --git a/test/delombok/resource/before/CommentsInterspersed.java b/test/delombok/resource/before/CommentsInterspersed.java
new file mode 100644
index 00000000..e7898aaa
--- /dev/null
+++ b/test/delombok/resource/before/CommentsInterspersed.java
@@ -0,0 +1,17 @@
+import /* cmt */ lombok./* cmt2 */Getter /* cmt3 */ ;
+
+public /*bla */ class CommentsInterspersed {
+ /** javadoc for field */
+ private int x;
+
+ private /* bla2 */ @Getter String test = "foo"; //$NON-NLS-1$
+
+ /** Javadoc on method */
+ public native void gwtTest(); /*-{
+ javascript;
+ }-*/
+} //haha!
+//hahaha!
+
+//hahahaha!
+
diff --git a/test/delombok/resource/before/ForEach.java b/test/delombok/resource/before/ForEach.java
deleted file mode 100644
index c4d4a9dc..00000000
--- a/test/delombok/resource/before/ForEach.java
+++ /dev/null
@@ -1,9 +0,0 @@
-import java.util.Arrays;
-public class ForEach {
- {
- for (int i : Arrays.asList(1, 2, 3)) {
- System.out.println(i);
- // Do something
- }
- }
-}
diff --git a/test/delombok/resource/before/ForLoop.java b/test/delombok/resource/before/ForLoop.java
deleted file mode 100644
index 2bed7f9b..00000000
--- a/test/delombok/resource/before/ForLoop.java
+++ /dev/null
@@ -1,12 +0,0 @@
-public class ForLoop {
-
- public static void main(String[] args) {
- // before loop
- for (int i = 0; i < 10; i++) {
- // start of block
- System.out.println(i);
- // end of block
- }
- // after loop
- }
-}
diff --git a/test/delombok/resource/before/GetterAccessLevel.java b/test/delombok/resource/before/GetterAccessLevel.java
new file mode 100644
index 00000000..8fd9bcc7
--- /dev/null
+++ b/test/delombok/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/delombok/resource/before/GetterAlreadyExists.java b/test/delombok/resource/before/GetterAlreadyExists.java
new file mode 100644
index 00000000..93b77dc1
--- /dev/null
+++ b/test/delombok/resource/before/GetterAlreadyExists.java
@@ -0,0 +1,108 @@
+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;
+ }
+}
+class Getter10 {
+ @lombok.Getter boolean foo;
+ static boolean hasFoo() {
+ return false;
+ }
+}
+class Getter11 {
+ @lombok.Getter boolean foo;
+ static boolean isFoo() {
+ return false;
+ }
+}
+class Getter12 {
+ @lombok.Getter boolean foo;
+ static boolean getFoo() {
+ return false;
+ }
+}
+class Getter13 {
+ @lombok.Getter String foo;
+ static boolean hasFoo() {
+ return false;
+ }
+}
+class Getter14 {
+ @lombok.Getter String foo;
+ static boolean isFoo() {
+ return false;
+ }
+}
+class Getter15 {
+ @lombok.Getter String foo;
+ static boolean getFoo() {
+ return false;
+ }
+}
+class Getter16 {
+ @lombok.Getter String foo;
+ static String hasFoo() {
+ return false;
+ }
+}
+class Getter17 {
+ @lombok.Getter String foo;
+ static String isFoo() {
+ return false;
+ }
+}
+class Getter18 {
+ @lombok.Getter String foo;
+ static String getFoo() {
+ return false;
+ }
+} \ No newline at end of file
diff --git a/test/delombok/resource/before/GetterBoolean.java b/test/delombok/resource/before/GetterBoolean.java
new file mode 100644
index 00000000..7d53ebbf
--- /dev/null
+++ b/test/delombok/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/delombok/resource/before/GetterPlain.java b/test/delombok/resource/before/GetterPlain.java
new file mode 100644
index 00000000..d104f428
--- /dev/null
+++ b/test/delombok/resource/before/GetterPlain.java
@@ -0,0 +1,5 @@
+import lombok.Getter;
+class GetterPlain {
+ @lombok.Getter int i;
+ @Getter int foo;
+} \ No newline at end of file
diff --git a/test/delombok/resource/before/NonNullPlain.java b/test/delombok/resource/before/NonNullPlain.java
new file mode 100644
index 00000000..eef64b2f
--- /dev/null
+++ b/test/delombok/resource/before/NonNullPlain.java
@@ -0,0 +1,11 @@
+class NonNullPlain {
+ @lombok.Getter
+ @lombok.Setter
+ @lombok.NonNull
+ @lombok.Getter int i;
+
+ @lombok.Getter
+ @lombok.Setter
+ @lombok.NonNull
+ String s;
+} \ No newline at end of file
diff --git a/test/delombok/resource/before/SetterAccessLevel.java b/test/delombok/resource/before/SetterAccessLevel.java
new file mode 100644
index 00000000..767341ef
--- /dev/null
+++ b/test/delombok/resource/before/SetterAccessLevel.java
@@ -0,0 +1,12 @@
+class Setter {
+ @lombok.Setter(lombok.AccessLevel.NONE)
+ boolean isNone;
+ @lombok.Setter(lombok.AccessLevel.PRIVATE)
+ boolean isPrivate;
+ @lombok.Setter(lombok.AccessLevel.PACKAGE)
+ boolean isPackage;
+ @lombok.Setter(lombok.AccessLevel.PROTECTED)
+ boolean isProtected;
+ @lombok.Setter(lombok.AccessLevel.PUBLIC)
+ boolean isPublic;
+}
diff --git a/test/delombok/resource/before/SetterAlreadyExists.java b/test/delombok/resource/before/SetterAlreadyExists.java
new file mode 100644
index 00000000..a7a94123
--- /dev/null
+++ b/test/delombok/resource/before/SetterAlreadyExists.java
@@ -0,0 +1,35 @@
+class Setter1 {
+ @lombok.Setter boolean foo;
+ void setFoo(boolean foo) {
+ }
+}
+class Setter2 {
+ @lombok.Setter boolean foo;
+ void setFoo(String foo) {
+ }
+}
+class Setter3 {
+ @lombok.Setter String foo;
+ void setFoo(boolean foo) {
+ }
+}
+class Setter4 {
+ @lombok.Setter String foo;
+ void setFoo(String foo) {
+ }
+}
+class Setter5 {
+ @lombok.Setter String foo;
+ void setFoo() {
+ }
+}
+class Setter6 {
+ @lombok.Setter String foo;
+ void setFoo(String foo, int x) {
+ }
+}
+class Setter7 {
+ @lombok.Setter String foo;
+ static void setFoo() {
+ }
+}
diff --git a/test/delombok/resource/before/SetterPlain.java b/test/delombok/resource/before/SetterPlain.java
new file mode 100644
index 00000000..e1ac99f8
--- /dev/null
+++ b/test/delombok/resource/before/SetterPlain.java
@@ -0,0 +1,5 @@
+import lombok.Setter;
+class SetterPlain {
+ @lombok.Setter int i;
+ @Setter int foo;
+} \ No newline at end of file
diff --git a/test/delombok/resource/before/SynchronizedName.java b/test/delombok/resource/before/SynchronizedName.java
new file mode 100644
index 00000000..3aaec705
--- /dev/null
+++ b/test/delombok/resource/before/SynchronizedName.java
@@ -0,0 +1,18 @@
+//ignore
+class SynchronizedName {
+ private Object read = new Object();
+ private static Object READ = new Object();
+
+ @lombok.Synchronized("read") void test1() {
+ System.out.println("one");
+ }
+ @lombok.Synchronized("write") void test2() {
+ System.out.println("two");
+ }
+ @lombok.Synchronized("read") static void test3() {
+ System.out.println("three");
+ }
+ @lombok.Synchronized("READ") void test4() {
+ System.out.println("four");
+ }
+}
diff --git a/test/delombok/resource/before/SynchronizedPlain.java b/test/delombok/resource/before/SynchronizedPlain.java
new file mode 100644
index 00000000..6f5f3b64
--- /dev/null
+++ b/test/delombok/resource/before/SynchronizedPlain.java
@@ -0,0 +1,17 @@
+import lombok.Synchronized;
+class SynchronizedPlain1 {
+ @lombok.Synchronized void test() {
+ System.out.println("one");
+ }
+ @Synchronized void test2() {
+ System.out.println("two");
+ }
+}
+class SynchronizedPlain2 {
+ @lombok.Synchronized static void test() {
+ System.out.println("three");
+ }
+ @Synchronized static void test2() {
+ System.out.println("four");
+ }
+} \ No newline at end of file
diff --git a/test/delombok/resource/before/WithComments.java b/test/delombok/resource/before/WithComments.java
deleted file mode 100644
index f75551ac..00000000
--- a/test/delombok/resource/before/WithComments.java
+++ /dev/null
@@ -1,5 +0,0 @@
-// Cool Comments
-public class WithComments {
- // Also inside the body
-// On start of line
-}
diff --git a/test/delombok/src/lombok/delombok/TestLombokFiles.java b/test/delombok/src/lombok/delombok/TestLombokFiles.java
index 12c16d76..713f81f5 100644
--- a/test/delombok/src/lombok/delombok/TestLombokFiles.java
+++ b/test/delombok/src/lombok/delombok/TestLombokFiles.java
@@ -33,10 +33,10 @@ public class TestLombokFiles {
public static File getBeforeDirectory() {
RunTestsViaDelombok.printErrors(true);
- return new File("test/lombok/resource/before");
+ return new File("test/delombok/resource/before");
}
public static File getAfterDirectory() {
- return new File("test/lombok/resource/after");
+ return new File("test/delombok/resource/after");
}
}
diff --git a/test/delombok/src/lombok/delombok/TestLombokFilesIdempotent.java b/test/delombok/src/lombok/delombok/TestLombokFilesIdempotent.java
index 556e907c..da6377f3 100644
--- a/test/delombok/src/lombok/delombok/TestLombokFilesIdempotent.java
+++ b/test/delombok/src/lombok/delombok/TestLombokFilesIdempotent.java
@@ -37,6 +37,6 @@ public class TestLombokFilesIdempotent {
}
public static File getAfterDirectory() {
- return new File("test/lombok/resource/after");
+ return new File("test/delombok/resource/after");
}
}
diff --git a/test/delombok/src/lombok/delombok/TestSourceFiles.java b/test/delombok/src/lombok/delombok/TestSourceFiles.java
index 2c0085eb..42addcd9 100644
--- a/test/delombok/src/lombok/delombok/TestSourceFiles.java
+++ b/test/delombok/src/lombok/delombok/TestSourceFiles.java
@@ -30,10 +30,10 @@ import org.junit.runner.RunWith;
@RunWith(DirectoryRunner.class)
public class TestSourceFiles {
public static File getBeforeDirectory() {
- return new File("test/delombok/resource/before");
+ return new File("test/pretty/resource/before");
}
public static File getAfterDirectory() {
- return new File("test/delombok/resource/after");
+ return new File("test/pretty/resource/after");
}
}