Updated tests for Getter, Setter and Cleanup. Added Synchronized

This commit is contained in:
Roel Spilker committed 2009-11-29 17:28:27 +01:00
1 parent 3cf45e932b
commit 78c1f1da11
8 files changed
+49 -8

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
import java.io.*;
class Cleanup {
class CleanupPlain {
void test() throws Exception {
InputStream in = new FileInputStream("in");
try {
+1 -1
View File
@@ -1,4 +1,4 @@
class Getter {
class GetterPlain {
int i;
int foo;
public int getI() {
+1 -1
View File
@@ -1,4 +1,4 @@
class Setter {
class SetterPlain {
int i;
int foo;
public void setI(final int i) {
@@ -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");
}
}
}
@@ -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");
+1 -1
View File
@@ -1,5 +1,5 @@
import lombok.Getter;
class Getter {
class GetterPlain {
@lombok.Getter int i;
@Getter int foo;
}
+1 -2
View File
@@ -1,6 +1,5 @@
//ignore
import lombok.Setter;
class Setter {
class SetterPlain {
@lombok.Setter int i;
@Setter int foo;
}
@@ -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");
}
}