diff options
author | Roel Spilker <r.spilker@gmail.com> | 2013-12-03 21:17:05 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-12-11 22:40:48 +0100 |
commit | 9639bc2ff466e94f629d81ff00d8cab654f3ab19 (patch) | |
tree | 99cfe2f729e49d06642774c55b500452f2b9992b /test | |
parent | 54c30d98c06277f42d2098d4f0731580b9f095e9 (diff) | |
download | lombok-9639bc2ff466e94f629d81ff00d8cab654f3ab19.tar.gz lombok-9639bc2ff466e94f629d81ff00d8cab654f3ab19.tar.bz2 lombok-9639bc2ff466e94f629d81ff00d8cab654f3ab19.zip |
[pretty] Make the tests work with the new delombok formatting options.
Diffstat (limited to 'test')
5 files changed, 26 insertions, 25 deletions
diff --git a/test/pretty/resource/after/TryWithResources.java b/test/pretty/resource/after/TryWithResources.java index 1a8b82e2..eb622f2c 100644 --- a/test/pretty/resource/after/TryWithResources.java +++ b/test/pretty/resource/after/TryWithResources.java @@ -2,7 +2,7 @@ import java.io.PrintWriter; public class TryWithResources { { - try (final PrintWriter pw = new PrintWriter(System.out);) { + try (PrintWriter pw = new PrintWriter(System.out)) { pw.println(); } } diff --git a/test/transform/resource/after-delombok/ValInTryWithResources.java b/test/transform/resource/after-delombok/ValInTryWithResources.java index 73f8d1a2..9aae99a2 100644 --- a/test/transform/resource/after-delombok/ValInTryWithResources.java +++ b/test/transform/resource/after-delombok/ValInTryWithResources.java @@ -2,7 +2,7 @@ import java.io.IOException; public class ValInTryWithResources { public void whyTryInsteadOfCleanup() throws IOException { - try (final java.io.InputStream in = getClass().getResourceAsStream("ValInTryWithResources.class");) { + try (java.io.InputStream in = getClass().getResourceAsStream("ValInTryWithResources.class")) { final java.io.InputStream i = in; final int j = in.read(); } diff --git a/test/transform/resource/after-delombok/ValWithLabel.java b/test/transform/resource/after-delombok/ValWithLabel.java index 82cd4ed7..4d8eabf2 100644 --- a/test/transform/resource/after-delombok/ValWithLabel.java +++ b/test/transform/resource/after-delombok/ValWithLabel.java @@ -1,6 +1,7 @@ public class ValWithLabel { { - LABEL: for (final java.lang.String x : new String[0]) { + LABEL: + for (final java.lang.String x : new String[0]) { if (x.toLowerCase() == null) { continue LABEL; } diff --git a/test/transform/resource/before/ConstructorsWithAccessors.java b/test/transform/resource/before/ConstructorsWithAccessors.java index d242317d..e5d2939f 100644 --- a/test/transform/resource/before/ConstructorsWithAccessors.java +++ b/test/transform/resource/before/ConstructorsWithAccessors.java @@ -1,6 +1,6 @@ @lombok.AllArgsConstructor @lombok.experimental.Accessors(prefix={"p", "_"}) class ConstructorsWithAccessors { - int plower; - int pUpper; - int _huh; - int __huh2; + int plower; + int pUpper; + int _huh; + int __huh2; } diff --git a/test/transform/resource/before/ExtensionMethodPlain.java b/test/transform/resource/before/ExtensionMethodPlain.java index 8c2f369d..f954d01f 100644 --- a/test/transform/resource/before/ExtensionMethodPlain.java +++ b/test/transform/resource/before/ExtensionMethodPlain.java @@ -2,22 +2,22 @@ import lombok.experimental.ExtensionMethod; @ExtensionMethod({java.util.Arrays.class, ExtensionMethodPlain.Extensions.class}) class ExtensionMethodPlain { - public String test() { - int[] intArray = {5, 3, 8, 2}; - intArray.sort(); - - String iAmNull = null; - return iAmNull.or("hELlO, WORlD!".toTitleCase()); - } - - static class Extensions { - public static <T> T or(T obj, T ifNull) { - return obj != null ? obj : ifNull; - } - - public static String toTitleCase(String in) { - if (in.isEmpty()) return in; - return "" + Character.toTitleCase(in.charAt(0)) + in.substring(1).toLowerCase(); - } - } + public String test() { + int[] intArray = {5, 3, 8, 2}; + intArray.sort(); + + String iAmNull = null; + return iAmNull.or("hELlO, WORlD!".toTitleCase()); + } + + static class Extensions { + public static <T> T or(T obj, T ifNull) { + return obj != null ? obj : ifNull; + } + + public static String toTitleCase(String in) { + if (in.isEmpty()) return in; + return "" + Character.toTitleCase(in.charAt(0)) + in.substring(1).toLowerCase(); + } + } } |