From 3cf45e932b26f8e96caeecdae570cf7d9cd5e328 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Sun, 29 Nov 2009 16:44:05 +0100 Subject: Improved comment placement (newlines, whitespace) --- test/lombok/resource/after/CommentsInterspersed.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test/lombok/resource/after') 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(); /*-{ -- cgit From 78c1f1da1169522324b69079cb49a91b9e8d7b76 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Sun, 29 Nov 2009 17:28:27 +0100 Subject: Updated tests for Getter, Setter and Cleanup. Added Synchronized --- test/lombok/resource/after/CleanupPlain.java | 2 +- test/lombok/resource/after/GetterPlain.java | 2 +- test/lombok/resource/after/SetterPlain.java | 2 +- test/lombok/resource/after/SynchronizedPlain.java | 26 ++++++++++++++++++++++ test/lombok/resource/before/CleanupPlain.java | 3 +-- test/lombok/resource/before/GetterPlain.java | 2 +- test/lombok/resource/before/SetterPlain.java | 3 +-- test/lombok/resource/before/SynchronizedPlain.java | 17 ++++++++++++++ 8 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 test/lombok/resource/after/SynchronizedPlain.java create mode 100644 test/lombok/resource/before/SynchronizedPlain.java (limited to 'test/lombok/resource/after') 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/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..2c168368 --- /dev/null +++ b/test/lombok/resource/after/SynchronizedPlain.java @@ -0,0 +1,26 @@ +class SynchronizedPlain1 { + private final Object $lock = new Object[0]; + void test() { + synchronized ($lock) { + System.out.println("one"); + } + } + void test2() { + synchronized ($lock) { + System.out.println("two"); + } + } +} +class SynchronizedPlain2 { + private static final Object $LOCK = new Object[0]; + static void test() { + synchronized ($LOCK) { + System.out.println("three"); + } + } + static void test2() { + synchronized ($LOCK) { + System.out.println("four"); + } + } +} \ 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..f903172c --- /dev/null +++ b/test/lombok/resource/before/SynchronizedPlain.java @@ -0,0 +1,17 @@ +import lombok.Synchronized; +class SynchronizedPlain1 { + @lombok.Synchonized void test() { + System.out.println("one"); + } + @Synchonized void test2() { + System.out.println("two"); + } +} +class SynchronizedPlain2 { + @lombok.Synchonized static void test() { + System.out.println("three"); + } + @Synchonized static void test2() { + System.out.println("four"); + } +} \ No newline at end of file -- cgit From 8d9b4fdaca4c1f84385262d84c0c8db7cc222b1a Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Sun, 29 Nov 2009 18:30:58 +0100 Subject: Fixed the test code for Synchronized --- test/lombok/resource/after/SynchronizedPlain.java | 4 ++-- test/lombok/resource/before/SynchronizedPlain.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test/lombok/resource/after') diff --git a/test/lombok/resource/after/SynchronizedPlain.java b/test/lombok/resource/after/SynchronizedPlain.java index 2c168368..fcbe03f2 100644 --- a/test/lombok/resource/after/SynchronizedPlain.java +++ b/test/lombok/resource/after/SynchronizedPlain.java @@ -1,5 +1,4 @@ class SynchronizedPlain1 { - private final Object $lock = new Object[0]; void test() { synchronized ($lock) { System.out.println("one"); @@ -10,9 +9,9 @@ class SynchronizedPlain1 { System.out.println("two"); } } + private final java.lang.Object $lock = new java.lang.Object[0]; } class SynchronizedPlain2 { - private static final Object $LOCK = new Object[0]; static void test() { synchronized ($LOCK) { System.out.println("three"); @@ -23,4 +22,5 @@ class SynchronizedPlain2 { 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/SynchronizedPlain.java b/test/lombok/resource/before/SynchronizedPlain.java index f903172c..6f5f3b64 100644 --- a/test/lombok/resource/before/SynchronizedPlain.java +++ b/test/lombok/resource/before/SynchronizedPlain.java @@ -1,17 +1,17 @@ import lombok.Synchronized; class SynchronizedPlain1 { - @lombok.Synchonized void test() { + @lombok.Synchronized void test() { System.out.println("one"); } - @Synchonized void test2() { + @Synchronized void test2() { System.out.println("two"); } } class SynchronizedPlain2 { - @lombok.Synchonized static void test() { + @lombok.Synchronized static void test() { System.out.println("three"); } - @Synchonized static void test2() { + @Synchronized static void test2() { System.out.println("four"); } } \ No newline at end of file -- cgit