aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/core/src/lombok/DirectoryRunner.java2
-rw-r--r--test/core/src/lombok/RunTestsViaDelombok.java (renamed from test/core/src/lombok/TestViaDelombok.java)2
-rw-r--r--test/delombok/resource/after/Cast.java3
-rw-r--r--test/delombok/resource/after/WithComments.java1
-rw-r--r--test/delombok/resource/before/WithComments.java1
-rw-r--r--test/delombok/src/lombok/delombok/TestLombokFiles.java4
-rw-r--r--test/lombok/resource/after/CleanupPlain.java2
-rw-r--r--test/lombok/resource/after/CommentsInterspersed.java8
-rw-r--r--test/lombok/resource/after/GetterPlain.java2
-rw-r--r--test/lombok/resource/after/SetterPlain.java2
-rw-r--r--test/lombok/resource/after/SynchronizedPlain.java26
-rw-r--r--test/lombok/resource/before/CleanupPlain.java3
-rw-r--r--test/lombok/resource/before/GetterPlain.java2
-rw-r--r--test/lombok/resource/before/SetterPlain.java3
-rw-r--r--test/lombok/resource/before/SynchronizedPlain.java17
15 files changed, 58 insertions, 20 deletions
diff --git a/test/core/src/lombok/DirectoryRunner.java b/test/core/src/lombok/DirectoryRunner.java
index 40b21aa0..1c8cfb2e 100644
--- a/test/core/src/lombok/DirectoryRunner.java
+++ b/test/core/src/lombok/DirectoryRunner.java
@@ -82,7 +82,7 @@ public class DirectoryRunner extends Runner {
if (mustIgnore(file)) {
return false;
}
- TestViaDelombok.compareFile(afterDirectory, file);
+ RunTestsViaDelombok.compareFile(afterDirectory, file);
return true;
}
diff --git a/test/core/src/lombok/TestViaDelombok.java b/test/core/src/lombok/RunTestsViaDelombok.java
index 63a8e1f8..f2aedfa3 100644
--- a/test/core/src/lombok/TestViaDelombok.java
+++ b/test/core/src/lombok/RunTestsViaDelombok.java
@@ -33,7 +33,7 @@ import java.util.List;
import lombok.delombok.Delombok;
-public class TestViaDelombok {
+public class RunTestsViaDelombok {
private static Delombok delombok = new Delombok();
private static volatile boolean printErrors = false;
diff --git a/test/delombok/resource/after/Cast.java b/test/delombok/resource/after/Cast.java
index a1b455f0..95237b0f 100644
--- a/test/delombok/resource/after/Cast.java
+++ b/test/delombok/resource/after/Cast.java
@@ -1,7 +1,6 @@
import java.util.*;
public class Cast {
public void test(List<?> list) {
- RandomAccess r = (/*before*/
- RandomAccess /*after*/)list;
+ RandomAccess r = (/*before*/ RandomAccess /*after*/)list;
}
} \ No newline at end of file
diff --git a/test/delombok/resource/after/WithComments.java b/test/delombok/resource/after/WithComments.java
index 684dcc8e..e4f078aa 100644
--- a/test/delombok/resource/after/WithComments.java
+++ b/test/delombok/resource/after/WithComments.java
@@ -1,4 +1,5 @@
// 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/before/WithComments.java b/test/delombok/resource/before/WithComments.java
index 22d044b3..f75551ac 100644
--- a/test/delombok/resource/before/WithComments.java
+++ b/test/delombok/resource/before/WithComments.java
@@ -1,4 +1,5 @@
// 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 66e3580e..12c16d76 100644
--- a/test/delombok/src/lombok/delombok/TestLombokFiles.java
+++ b/test/delombok/src/lombok/delombok/TestLombokFiles.java
@@ -24,7 +24,7 @@ package lombok.delombok;
import java.io.File;
import lombok.DirectoryRunner;
-import lombok.TestViaDelombok;
+import lombok.RunTestsViaDelombok;
import org.junit.runner.RunWith;
@@ -32,7 +32,7 @@ import org.junit.runner.RunWith;
public class TestLombokFiles {
public static File getBeforeDirectory() {
- TestViaDelombok.printErrors(true);
+ RunTestsViaDelombok.printErrors(true);
return new File("test/lombok/resource/before");
}
diff --git a/test/lombok/resource/after/CleanupPlain.java b/test/lombok/resource/after/CleanupPlain.java
index 25c66ced..35d51543 100644
--- a/test/lombok/resource/after/CleanupPlain.java
+++ b/test/lombok/resource/after/CleanupPlain.java
@@ -1,5 +1,5 @@
import java.io.*;
-class Cleanup {
+class CleanupPlain {
void test() throws Exception {
InputStream in = new FileInputStream("in");
try {
diff --git a/test/lombok/resource/after/CommentsInterspersed.java b/test/lombok/resource/after/CommentsInterspersed.java
index f3841606..275f198f 100644
--- a/test/lombok/resource/after/CommentsInterspersed.java
+++ b/test/lombok/resource/after/CommentsInterspersed.java
@@ -1,13 +1,9 @@
-/* cmt */
-/* cmt2 */
-/* cmt3 */
-/*bla */
+/* cmt *//* cmt2 */ /* cmt3 */ /*bla */
public class CommentsInterspersed {
/** javadoc for field */
private int x;
- /* bla2 */
- private String test = "foo"; //$NON-NLS-1$
+ /* bla2 */ private String test = "foo"; //$NON-NLS-1$
/** Javadoc on method */
public native void gwtTest(); /*-{
diff --git a/test/lombok/resource/after/GetterPlain.java b/test/lombok/resource/after/GetterPlain.java
index 04944df8..5e8cc965 100644
--- a/test/lombok/resource/after/GetterPlain.java
+++ b/test/lombok/resource/after/GetterPlain.java
@@ -1,4 +1,4 @@
-class Getter {
+class GetterPlain {
int i;
int foo;
public int getI() {
diff --git a/test/lombok/resource/after/SetterPlain.java b/test/lombok/resource/after/SetterPlain.java
index 2570365c..8faad0ec 100644
--- a/test/lombok/resource/after/SetterPlain.java
+++ b/test/lombok/resource/after/SetterPlain.java
@@ -1,4 +1,4 @@
-class Setter {
+class SetterPlain {
int i;
int foo;
public void setI(final int i) {
diff --git a/test/lombok/resource/after/SynchronizedPlain.java b/test/lombok/resource/after/SynchronizedPlain.java
new file mode 100644
index 00000000..fcbe03f2
--- /dev/null
+++ b/test/lombok/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/lombok/resource/before/CleanupPlain.java b/test/lombok/resource/before/CleanupPlain.java
index 6cf09062..a91ac3c1 100644
--- a/test/lombok/resource/before/CleanupPlain.java
+++ b/test/lombok/resource/before/CleanupPlain.java
@@ -1,7 +1,6 @@
-//ignore
import lombok.Cleanup;
import java.io.*;
-class Cleanup {
+class CleanupPlain {
void test() throws Exception {
@lombok.Cleanup InputStream in = new FileInputStream("in");
@Cleanup OutputStream out = new FileOutputStream("out");
diff --git a/test/lombok/resource/before/GetterPlain.java b/test/lombok/resource/before/GetterPlain.java
index e6018972..d104f428 100644
--- a/test/lombok/resource/before/GetterPlain.java
+++ b/test/lombok/resource/before/GetterPlain.java
@@ -1,5 +1,5 @@
import lombok.Getter;
-class Getter {
+class GetterPlain {
@lombok.Getter int i;
@Getter int foo;
} \ No newline at end of file
diff --git a/test/lombok/resource/before/SetterPlain.java b/test/lombok/resource/before/SetterPlain.java
index 85d3aad5..e1ac99f8 100644
--- a/test/lombok/resource/before/SetterPlain.java
+++ b/test/lombok/resource/before/SetterPlain.java
@@ -1,6 +1,5 @@
-//ignore
import lombok.Setter;
-class Setter {
+class SetterPlain {
@lombok.Setter int i;
@Setter int foo;
} \ No newline at end of file
diff --git a/test/lombok/resource/before/SynchronizedPlain.java b/test/lombok/resource/before/SynchronizedPlain.java
new file mode 100644
index 00000000..6f5f3b64
--- /dev/null
+++ b/test/lombok/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