From 2ff16d337505d540fc840eae49543aa3e8801107 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Wed, 2 Dec 2009 02:47:38 +0100 Subject: Added new tests for SneakyThrows --- .../resource/after/SneakyThrowsSingle.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/delombok/resource/after/SneakyThrowsSingle.java (limited to 'test/delombok/resource/after/SneakyThrowsSingle.java') diff --git a/test/delombok/resource/after/SneakyThrowsSingle.java b/test/delombok/resource/after/SneakyThrowsSingle.java new file mode 100644 index 00000000..519d06a9 --- /dev/null +++ b/test/delombok/resource/after/SneakyThrowsSingle.java @@ -0,0 +1,26 @@ +import java.io.IOException; +class SneakyThrowsSingle { + public void test() { + try { + System.out.println("test1"); + } catch (Throwable $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + public void test2() { + try { + System.out.println("test2"); + throw new IOException(); + } catch (IOException $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + public void test3() { + try { + System.out.println("test3"); + throw new IOException(); + } catch (IOException $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } +} \ No newline at end of file -- cgit