aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/core/src/lombok/RunTestsViaDelombok.java8
-rw-r--r--test/transform/resource/after-delombok/DelegateWithDeprecated.java24
-rw-r--r--test/transform/resource/after-ecj/DelegateWithDeprecated.java21
-rw-r--r--test/transform/resource/before/DelegateWithDeprecated.java13
4 files changed, 65 insertions, 1 deletions
diff --git a/test/core/src/lombok/RunTestsViaDelombok.java b/test/core/src/lombok/RunTestsViaDelombok.java
index bde74434..52653e2e 100644
--- a/test/core/src/lombok/RunTestsViaDelombok.java
+++ b/test/core/src/lombok/RunTestsViaDelombok.java
@@ -56,6 +56,12 @@ public class RunTestsViaDelombok extends AbstractRunTests {
delombok.addFile(file.getAbsoluteFile().getParentFile(), file.getName());
delombok.setSourcepath(file.getAbsoluteFile().getParent());
delombok.setWriter(result);
- delombok.delombok();
+ Locale originalLocale = Locale.getDefault();
+ try {
+ Locale.setDefault(Locale.ENGLISH);
+ delombok.delombok();
+ } finally {
+ Locale.setDefault(originalLocale);
+ }
}
}
diff --git a/test/transform/resource/after-delombok/DelegateWithDeprecated.java b/test/transform/resource/after-delombok/DelegateWithDeprecated.java
new file mode 100644
index 00000000..04e12160
--- /dev/null
+++ b/test/transform/resource/after-delombok/DelegateWithDeprecated.java
@@ -0,0 +1,24 @@
+class DelegateWithDeprecated {
+ private Bar bar;
+ private interface Bar {
+ @Deprecated
+ void deprecatedAnnotation();
+ /** @deprecated */
+ void deprecatedComment();
+ void notDeprecated();
+ }
+ @java.lang.Deprecated
+ @java.lang.SuppressWarnings("all")
+ public void deprecatedAnnotation() {
+ this.bar.deprecatedAnnotation();
+ }
+ @java.lang.Deprecated
+ @java.lang.SuppressWarnings("all")
+ public void deprecatedComment() {
+ this.bar.deprecatedComment();
+ }
+ @java.lang.SuppressWarnings("all")
+ public void notDeprecated() {
+ this.bar.notDeprecated();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/DelegateWithDeprecated.java b/test/transform/resource/after-ecj/DelegateWithDeprecated.java
new file mode 100644
index 00000000..2a4fdf98
--- /dev/null
+++ b/test/transform/resource/after-ecj/DelegateWithDeprecated.java
@@ -0,0 +1,21 @@
+import lombok.Delegate;
+class DelegateWithDeprecated {
+ private interface Bar {
+ @Deprecated void deprecatedAnnotation();
+ void deprecatedComment();
+ void notDeprecated();
+ }
+ private @Delegate Bar bar;
+ public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void deprecatedAnnotation() {
+ this.bar.deprecatedAnnotation();
+ }
+ public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void deprecatedComment() {
+ this.bar.deprecatedComment();
+ }
+ public @java.lang.SuppressWarnings("all") void notDeprecated() {
+ this.bar.notDeprecated();
+ }
+ DelegateWithDeprecated() {
+ super();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/DelegateWithDeprecated.java b/test/transform/resource/before/DelegateWithDeprecated.java
new file mode 100644
index 00000000..b748c6ec
--- /dev/null
+++ b/test/transform/resource/before/DelegateWithDeprecated.java
@@ -0,0 +1,13 @@
+import lombok.Delegate;
+
+class DelegateWithDeprecated {
+ @Delegate private Bar bar;
+
+ private interface Bar {
+ @Deprecated
+ void deprecatedAnnotation();
+ /** @deprecated */
+ void deprecatedComment();
+ void notDeprecated();
+ }
+} \ No newline at end of file