refactored the tests to prepare running ecj as well as delombok.

This commit is contained in:
Reinier Zwitserloot committed 2010-07-21 23:52:28 +02:00
1 parent 1a9f8f168a
commit 59e585a0c6
63 files changed
+386 -186

No files matched your search

@@ -0,0 +1,45 @@
import java.awt.AWTException;
import java.io.IOException;
import java.util.Random;
class SneakyThrowsMultiple {
public void test() {
try {
try {
System.out.println("test1");
throw new IOException();
} catch (IOException $ex) {
throw lombok.Lombok.sneakyThrow($ex);
}
} catch (Throwable $ex) {
throw lombok.Lombok.sneakyThrow($ex);
}
}
public void test2() {
try {
try {
System.out.println("test2");
if (new Random().nextBoolean()) {
throw new IOException();
} else {
throw new AWTException("WHAT");
}
} catch (AWTException $ex) {
throw lombok.Lombok.sneakyThrow($ex);
}
} catch (IOException $ex) {
throw lombok.Lombok.sneakyThrow($ex);
}
}
public void test3() {
try {
try {
System.out.println("test3");
throw new IOException();
} catch (IOException $ex) {
throw lombok.Lombok.sneakyThrow($ex);
}
} catch (Throwable $ex) {
throw lombok.Lombok.sneakyThrow($ex);
}
}
}