From 8db179346171d47230b88cdd509954391fb49d1c Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 1 Nov 2015 16:08:06 +0100 Subject: Added a prettyprinter test case with some exotic java constructs, and fixed a few bugs involving these. Also removed the old pretty printer. --- test/pretty/resource/after/ExoticJava.java | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 test/pretty/resource/after/ExoticJava.java (limited to 'test/pretty/resource/after/ExoticJava.java') diff --git a/test/pretty/resource/after/ExoticJava.java b/test/pretty/resource/after/ExoticJava.java new file mode 100644 index 00000000..fb9a9131 --- /dev/null +++ b/test/pretty/resource/after/ExoticJava.java @@ -0,0 +1,46 @@ +import static java.lang.String.*; +import java.io.*; +class ExoticJava { + public ExoticJava(T genericsInConstructor, V genericsInType) { + System.out.println(new ExoticJava("Hello", 5)); + } + public void test() { + int x = 5; + int[] y = {10}; + ; + class MethodLocal implements Serializable, java.util.RandomAccess { + @SuppressWarnings({"unchecked", "rawtypes"}) + public final strictfp int foo() { + int x = super.hashCode(); + x <<= 5; + do { + x <<= 5; + } while (Boolean.FALSE); + return x; + } + } + for (int i = 10, j[] = {20}; i < 5; i++, j[0]++) { + String z = ""; + try ( + PrintWriter pw = new PrintWriter(System.out); + PrintWriter p2 = new PrintWriter(System.out)) { + pw.println(); + } finally { + synchronized (z) { + System.out.println(z); + } + } + if ((y == null)) { + } + if (((y == null))) ; + { + ; + } + java.util.List list = new java.util.ArrayList<>(); + assert Boolean.TRUE : "That\'s weird"; + double d = -1.8E12; + long loooong = 305441741; + int octal = 87; + } + } +} \ No newline at end of file -- cgit