From d4ed666abfdafc9007734bccf9acf2a80a32770e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Dec 2009 17:37:53 +0100 Subject: Added some tests for @ToString --- test/delombok/resource/after/ToStringInner.java | 32 ++++++++++++++++++++++++ test/delombok/resource/after/ToStringPlain.java | 16 ++++++++++++ test/delombok/resource/before/ToStringInner.java | 17 +++++++++++++ test/delombok/resource/before/ToStringPlain.java | 9 +++++++ 4 files changed, 74 insertions(+) create mode 100644 test/delombok/resource/after/ToStringInner.java create mode 100644 test/delombok/resource/after/ToStringPlain.java create mode 100644 test/delombok/resource/before/ToStringInner.java create mode 100644 test/delombok/resource/before/ToStringPlain.java (limited to 'test/delombok') diff --git a/test/delombok/resource/after/ToStringInner.java b/test/delombok/resource/after/ToStringInner.java new file mode 100644 index 00000000..29e7dc91 --- /dev/null +++ b/test/delombok/resource/after/ToStringInner.java @@ -0,0 +1,32 @@ +class ToStringOuter { + final int x; + String name; + class ToStringInner { + final int y; + @java.lang.Override + public java.lang.String toString() { + return "ToStringOuter.ToStringInner(y=" + y + ")"; + } + } + static class ToStringStaticInner { + final int y; + @java.lang.Override + public java.lang.String toString() { + return "ToStringOuter.ToStringStaticInner(y=" + y + ")"; + } + } + class ToStringMiddle { + class ToStringMoreInner { + final String name; + @java.lang.Override + public java.lang.String toString() { + return "ToStringOuter.ToStringMiddle.ToStringMoreInner(name=" + name + ")"; + } + } + } + + @java.lang.Override + public java.lang.String toString() { + return "ToStringOuter(x=" + x + ", name=" + name + ")"; + } +} \ No newline at end of file diff --git a/test/delombok/resource/after/ToStringPlain.java b/test/delombok/resource/after/ToStringPlain.java new file mode 100644 index 00000000..4f71e392 --- /dev/null +++ b/test/delombok/resource/after/ToStringPlain.java @@ -0,0 +1,16 @@ +class ToString1 { + final int x; + String name; + @java.lang.Override + public java.lang.String toString() { + return "ToString1(x=" + x + ", name=" + name + ")"; + } +} +class ToString2 { + final int x; + String name; + @java.lang.Override + public java.lang.String toString() { + return "ToString2(x=" + x + ", name=" + name + ")"; + } +} \ No newline at end of file diff --git a/test/delombok/resource/before/ToStringInner.java b/test/delombok/resource/before/ToStringInner.java new file mode 100644 index 00000000..418c2f92 --- /dev/null +++ b/test/delombok/resource/before/ToStringInner.java @@ -0,0 +1,17 @@ +//ignore +import lombok.ToString; +@ToString class ToStringOuter { + final int x; + String name; + @ToString class ToStringInner { + final int y; + } + @ToString static class ToStringStaticInner { + final int y; + } + class ToStringMiddle { + @ToString class ToStringMoreInner { + final String name; + } + } +} \ No newline at end of file diff --git a/test/delombok/resource/before/ToStringPlain.java b/test/delombok/resource/before/ToStringPlain.java new file mode 100644 index 00000000..5b9db1c7 --- /dev/null +++ b/test/delombok/resource/before/ToStringPlain.java @@ -0,0 +1,9 @@ +import lombok.ToString; +@lombok.ToString class ToString1 { + final int x; + String name; +} +@ToString class ToString2 { + final int x; + String name; +} \ No newline at end of file -- cgit