aboutsummaryrefslogtreecommitdiff
path: root/test/delombok
diff options
context:
space:
mode:
Diffstat (limited to 'test/delombok')
-rw-r--r--test/delombok/resource/after/ForLoop.java13
-rw-r--r--test/delombok/resource/after/WithComments.java2
-rw-r--r--test/delombok/resource/before/ForLoop.java12
-rw-r--r--test/delombok/src/lombok/delombok/TestSourceFiles.java11
4 files changed, 29 insertions, 9 deletions
diff --git a/test/delombok/resource/after/ForLoop.java b/test/delombok/resource/after/ForLoop.java
new file mode 100644
index 00000000..609549b7
--- /dev/null
+++ b/test/delombok/resource/after/ForLoop.java
@@ -0,0 +1,13 @@
+
+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/WithComments.java b/test/delombok/resource/after/WithComments.java
index 0f9ddb9f..59cc97c4 100644
--- a/test/delombok/resource/after/WithComments.java
+++ b/test/delombok/resource/after/WithComments.java
@@ -1,5 +1,5 @@
// Cool Comments
public class WithComments {
- // Also inside the body
+ // Also inside the body
} \ No newline at end of file
diff --git a/test/delombok/resource/before/ForLoop.java b/test/delombok/resource/before/ForLoop.java
new file mode 100644
index 00000000..2bed7f9b
--- /dev/null
+++ b/test/delombok/resource/before/ForLoop.java
@@ -0,0 +1,12 @@
+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/src/lombok/delombok/TestSourceFiles.java b/test/delombok/src/lombok/delombok/TestSourceFiles.java
index 90c9b543..374eeb8b 100644
--- a/test/delombok/src/lombok/delombok/TestSourceFiles.java
+++ b/test/delombok/src/lombok/delombok/TestSourceFiles.java
@@ -21,6 +21,8 @@
*/
package lombok.delombok;
+import static org.junit.Assert.fail;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
@@ -31,11 +33,6 @@ import lombok.delombok.CommentPreservingParser.ParseResult;
import org.junit.BeforeClass;
import org.junit.Test;
-import static org.junit.Assert.*;
-
-import com.sun.tools.javac.main.OptionName;
-import com.sun.tools.javac.util.Context;
-import com.sun.tools.javac.util.Options;
public class TestSourceFiles {
@@ -48,9 +45,7 @@ public class TestSourceFiles {
@BeforeClass
public static void init() {
- Context c = new Context();
- Options.instance(c).put(OptionName.ENCODING, "utf-8");
- parser = new CommentPreservingParser(c);
+ parser = new CommentPreservingParser();
}
@Test