From aad0666ef2f5463bb7e746318a902ebee57e3e86 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 13 Aug 2015 14:11:00 +0100 Subject: Added new feature: @Helper including both annotations and tests. --- test/transform/resource/after-delombok/Helper.java | 16 +++++++++++++ test/transform/resource/after-ecj/Helper.java | 26 ++++++++++++++++++++++ test/transform/resource/before/Helper.java | 19 ++++++++++++++++ .../messages-delombok/Helper.java.messages | 1 + .../resource/messages-ecj/Helper.java.messages | 1 + 5 files changed, 63 insertions(+) create mode 100644 test/transform/resource/after-delombok/Helper.java create mode 100644 test/transform/resource/after-ecj/Helper.java create mode 100644 test/transform/resource/before/Helper.java create mode 100644 test/transform/resource/messages-delombok/Helper.java.messages create mode 100644 test/transform/resource/messages-ecj/Helper.java.messages (limited to 'test/transform') diff --git a/test/transform/resource/after-delombok/Helper.java b/test/transform/resource/after-delombok/Helper.java new file mode 100644 index 00000000..52f50dd2 --- /dev/null +++ b/test/transform/resource/after-delombok/Helper.java @@ -0,0 +1,16 @@ +class HelperTest { + void test() { + class H1 { + void foo() { + System.out.println("Hello"); + } + } + final H1 $H1 = new H1(); + $H1.foo(); + class H2 { + void bar() { + $H1.foo(); + } + } + } +} diff --git a/test/transform/resource/after-ecj/Helper.java b/test/transform/resource/after-ecj/Helper.java new file mode 100644 index 00000000..1b4e8bd2 --- /dev/null +++ b/test/transform/resource/after-ecj/Helper.java @@ -0,0 +1,26 @@ +import lombok.experimental.Helper; +class HelperTest { + HelperTest() { + super(); + } + void test() { + @Helper class H1 { + H1() { + super(); + } + void foo() { + System.out.println("Hello"); + } + } + final H1 $H1 = new H1(); + $H1.foo(); + @Helper class H2 { + H2() { + super(); + } + void bar() { + $H1.foo(); + } + } + } +} diff --git a/test/transform/resource/before/Helper.java b/test/transform/resource/before/Helper.java new file mode 100644 index 00000000..145d740f --- /dev/null +++ b/test/transform/resource/before/Helper.java @@ -0,0 +1,19 @@ +import lombok.experimental.Helper; + +class HelperTest { + void test() { + @Helper class H1 { + void foo() { + System.out.println("Hello"); + } + } + + foo(); + + @Helper class H2 { + void bar() { + foo(); + } + } + } +} \ No newline at end of file diff --git a/test/transform/resource/messages-delombok/Helper.java.messages b/test/transform/resource/messages-delombok/Helper.java.messages new file mode 100644 index 00000000..05260c0b --- /dev/null +++ b/test/transform/resource/messages-delombok/Helper.java.messages @@ -0,0 +1 @@ +13 No methods of this helper class are ever used. \ No newline at end of file diff --git a/test/transform/resource/messages-ecj/Helper.java.messages b/test/transform/resource/messages-ecj/Helper.java.messages new file mode 100644 index 00000000..7207e136 --- /dev/null +++ b/test/transform/resource/messages-ecj/Helper.java.messages @@ -0,0 +1 @@ +13 No methods of this helper class are ever used. -- cgit