aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-07-16 22:04:39 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-07-16 22:04:39 +0200
commite6421509987c01e06b7c79ef406cc01ff174ae81 (patch)
treefd86dd5dcdc258c3927b778dc23e01d3ea652e62 /test/transform/resource/after-delombok
parent2502862f896d11b9e386df34f6891918ed443409 (diff)
downloadlombok-e6421509987c01e06b7c79ef406cc01ff174ae81.tar.gz
lombok-e6421509987c01e06b7c79ef406cc01ff174ae81.tar.bz2
lombok-e6421509987c01e06b7c79ef406cc01ff174ae81.zip
Updated tests to reflect changes to delombok (delombok now kills super(), because attrib adds them even in places where that's wrong).
Also split up the SynchronizedName test into separate cases for each expected failure mode.
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r--test/transform/resource/after-delombok/DataPlain.java1
-rw-r--r--test/transform/resource/after-delombok/SneakyThrowsPlain.java1
-rw-r--r--test/transform/resource/after-delombok/SynchronizedName.java11
-rw-r--r--test/transform/resource/after-delombok/SynchronizedNameNoSuchField.java7
-rw-r--r--test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java9
5 files changed, 18 insertions, 11 deletions
diff --git a/test/transform/resource/after-delombok/DataPlain.java b/test/transform/resource/after-delombok/DataPlain.java
index cb002e07..a8cb37af 100644
--- a/test/transform/resource/after-delombok/DataPlain.java
+++ b/test/transform/resource/after-delombok/DataPlain.java
@@ -155,7 +155,6 @@ final class Data3 {
final class Data4 extends java.util.Timer {
int x;
Data4() {
- super();
}
@java.lang.SuppressWarnings("all")
public int getX() {
diff --git a/test/transform/resource/after-delombok/SneakyThrowsPlain.java b/test/transform/resource/after-delombok/SneakyThrowsPlain.java
index 5c0890b5..f712ab55 100644
--- a/test/transform/resource/after-delombok/SneakyThrowsPlain.java
+++ b/test/transform/resource/after-delombok/SneakyThrowsPlain.java
@@ -1,6 +1,5 @@
class SneakyThrowsPlain {
SneakyThrowsPlain() {
- super();
try {
System.out.println("constructor");
} catch (final java.lang.Throwable $ex) {
diff --git a/test/transform/resource/after-delombok/SynchronizedName.java b/test/transform/resource/after-delombok/SynchronizedName.java
index e7dd23ff..ab3c0431 100644
--- a/test/transform/resource/after-delombok/SynchronizedName.java
+++ b/test/transform/resource/after-delombok/SynchronizedName.java
@@ -1,19 +1,12 @@
class SynchronizedName {
private Object read = new Object();
private static Object READ = new Object();
+
void test1() {
synchronized (this.read) {
System.out.println("one");
}
}
- void test2() {
- System.out.println("two");
- }
- static void test3() {
- synchronized (SynchronizedName.read) {
- System.out.println("three");
- }
- }
void test4() {
synchronized (this.READ) {
System.out.println("four");
@@ -24,4 +17,4 @@ class SynchronizedName {
System.out.println("five");
}
}
-}
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/SynchronizedNameNoSuchField.java b/test/transform/resource/after-delombok/SynchronizedNameNoSuchField.java
new file mode 100644
index 00000000..d252985f
--- /dev/null
+++ b/test/transform/resource/after-delombok/SynchronizedNameNoSuchField.java
@@ -0,0 +1,7 @@
+class SynchronizedNameNoSuchField {
+ private Object read = new Object();
+ private static Object READ = new Object();
+ void test2() {
+ System.out.println("two");
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java b/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java
new file mode 100644
index 00000000..8441570b
--- /dev/null
+++ b/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java
@@ -0,0 +1,9 @@
+class SynchronizedNameStaticToInstanceRef {
+ private Object read = new Object();
+ private static Object READ = new Object();
+ static void test3() {
+ synchronized (SynchronizedNameStaticToInstanceRef.read) {
+ System.out.println("three");
+ }
+ }
+} \ No newline at end of file