diff options
Diffstat (limited to 'test/delombok')
-rw-r--r-- | test/delombok/resource/after/Cast.java | 7 | ||||
-rw-r--r-- | test/delombok/resource/after/ForLoop.java | 13 | ||||
-rw-r--r-- | test/delombok/resource/after/WithComments.java | 5 | ||||
-rw-r--r-- | test/delombok/resource/before/Cast.java | 6 | ||||
-rw-r--r-- | test/delombok/resource/before/ForLoop.java | 12 | ||||
-rw-r--r-- | test/delombok/resource/before/WithComments.java | 4 | ||||
-rw-r--r-- | test/delombok/src/lombok/delombok/TestLombokFiles.java | 38 | ||||
-rw-r--r-- | test/delombok/src/lombok/delombok/TestSourceFiles.java | 38 |
8 files changed, 123 insertions, 0 deletions
diff --git a/test/delombok/resource/after/Cast.java b/test/delombok/resource/after/Cast.java new file mode 100644 index 00000000..a1b455f0 --- /dev/null +++ b/test/delombok/resource/after/Cast.java @@ -0,0 +1,7 @@ +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/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 new file mode 100644 index 00000000..59cc97c4 --- /dev/null +++ b/test/delombok/resource/after/WithComments.java @@ -0,0 +1,5 @@ +// Cool Comments + +public class WithComments { + // Also inside the body +}
\ No newline at end of file diff --git a/test/delombok/resource/before/Cast.java b/test/delombok/resource/before/Cast.java new file mode 100644 index 00000000..95237b0f --- /dev/null +++ b/test/delombok/resource/before/Cast.java @@ -0,0 +1,6 @@ +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/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/resource/before/WithComments.java b/test/delombok/resource/before/WithComments.java new file mode 100644 index 00000000..22d044b3 --- /dev/null +++ b/test/delombok/resource/before/WithComments.java @@ -0,0 +1,4 @@ +// Cool Comments +public class WithComments { + // Also inside the body +} diff --git a/test/delombok/src/lombok/delombok/TestLombokFiles.java b/test/delombok/src/lombok/delombok/TestLombokFiles.java new file mode 100644 index 00000000..1d93a4b2 --- /dev/null +++ b/test/delombok/src/lombok/delombok/TestLombokFiles.java @@ -0,0 +1,38 @@ +/* + * Copyright © 2009 Reinier Zwitserloot and Roel Spilker. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package lombok.delombok; + +import java.io.File; + +import lombok.TestViaDelombok; + +import org.junit.Test; + +public class TestLombokFiles { + private static final File BEFORE_DIR = new File("test/lombok/resource/before"); + private static final File AFTER_DIR = new File("test/lombok/resource/after"); + + @Test + public void testSources() throws Exception { + TestViaDelombok.runComparison(BEFORE_DIR, AFTER_DIR); + } +} diff --git a/test/delombok/src/lombok/delombok/TestSourceFiles.java b/test/delombok/src/lombok/delombok/TestSourceFiles.java new file mode 100644 index 00000000..a5df5197 --- /dev/null +++ b/test/delombok/src/lombok/delombok/TestSourceFiles.java @@ -0,0 +1,38 @@ +/* + * Copyright © 2009 Reinier Zwitserloot and Roel Spilker. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package lombok.delombok; + +import java.io.File; + +import lombok.TestViaDelombok; + +import org.junit.Test; + +public class TestSourceFiles { + private static final File BEFORE_DIR = new File("test/delombok/resource/before"); + private static final File AFTER_DIR = new File("test/delombok/resource/after"); + + @Test + public void testSources() throws Exception { + TestViaDelombok.runComparison(BEFORE_DIR, AFTER_DIR); + } +} |