aboutsummaryrefslogtreecommitdiff
path: root/test/delombok/resource
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2009-12-02 01:51:50 +0100
committerRoel Spilker <r.spilker@gmail.com>2009-12-02 01:51:50 +0100
commit1f4fb2fb4885ad9c808a080fbbf63353042e08d1 (patch)
tree072d3f70ebec84435cd507886591e4b2cf38cf35 /test/delombok/resource
parentd2fc0df773912f8116bdcea88f4ded6343a13040 (diff)
downloadlombok-1f4fb2fb4885ad9c808a080fbbf63353042e08d1.tar.gz
lombok-1f4fb2fb4885ad9c808a080fbbf63353042e08d1.tar.bz2
lombok-1f4fb2fb4885ad9c808a080fbbf63353042e08d1.zip
Fixed #73 SneakyThrows without parameter did not default to Throwable.class
Added tests for SneakyThrows
Diffstat (limited to 'test/delombok/resource')
-rw-r--r--test/delombok/resource/after/SneakyThrowsPlain.java17
-rw-r--r--test/delombok/resource/before/SneakyThrowsPlain.java10
2 files changed, 27 insertions, 0 deletions
diff --git a/test/delombok/resource/after/SneakyThrowsPlain.java b/test/delombok/resource/after/SneakyThrowsPlain.java
new file mode 100644
index 00000000..d5abc478
--- /dev/null
+++ b/test/delombok/resource/after/SneakyThrowsPlain.java
@@ -0,0 +1,17 @@
+class SneakyThrowsPlain {
+ public void test() {
+ try {
+ System.out.println("test1");
+ } catch (java.lang.Throwable $ex) {
+ throw lombok.Lombok.sneakyThrow($ex);
+ }
+ }
+
+ public void test2() {
+ try {
+ System.out.println("test2");
+ } catch (java.lang.Throwable $ex) {
+ throw lombok.Lombok.sneakyThrow($ex);
+ }
+ }
+} \ No newline at end of file
diff --git a/test/delombok/resource/before/SneakyThrowsPlain.java b/test/delombok/resource/before/SneakyThrowsPlain.java
new file mode 100644
index 00000000..97fecf8f
--- /dev/null
+++ b/test/delombok/resource/before/SneakyThrowsPlain.java
@@ -0,0 +1,10 @@
+import lombok.SneakyThrows;
+class SneakyThrowsPlain {
+ @lombok.SneakyThrows public void test() {
+ System.out.println("test1");
+ }
+
+ @SneakyThrows public void test2() {
+ System.out.println("test2");
+ }
+} \ No newline at end of file