equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
61 public static void main(String... args) throws Exception { |
61 public static void main(String... args) throws Exception { |
62 new TestToString().run(); |
62 new TestToString().run(); |
63 } |
63 } |
64 |
64 |
65 void run() throws Exception { |
65 void run() throws Exception { |
66 for (String s: statements) { |
66 try { |
67 test(s); |
67 for (String s: statements) { |
|
68 test(s); |
|
69 } |
|
70 |
|
71 if (errors > 0) |
|
72 throw new Exception(errors + " errors found"); |
|
73 } finally { |
|
74 fm.close(); |
68 } |
75 } |
69 |
|
70 if (errors > 0) |
|
71 throw new Exception(errors + " errors found"); |
|
72 } |
76 } |
73 |
77 |
74 void test(String stmt) throws IOException { |
78 void test(String stmt) throws IOException { |
75 System.err.println("Test: " + stmt); |
79 System.err.println("Test: " + stmt); |
76 List<String> options = Collections.<String>emptyList(); |
80 List<String> options = Collections.<String>emptyList(); |