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. |
75 final String name; |
75 final String name; |
76 } |
76 } |
77 |
77 |
78 public static void main(String... args) throws Exception { |
78 public static void main(String... args) throws Exception { |
79 JavaCompiler comp = ToolProvider.getSystemJavaCompiler(); |
79 JavaCompiler comp = ToolProvider.getSystemJavaCompiler(); |
80 StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null); |
80 try (StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null)) { |
81 int errors = 0; |
81 int errors = 0; |
82 |
82 |
83 for (ClassKind ck: ClassKind.values()) { |
83 for (ClassKind ck: ClassKind.values()) { |
84 for (GenericKind gk: GenericKind.values()) { |
84 for (GenericKind gk: GenericKind.values()) { |
85 for (SuperKind sk: SuperKind.values()) { |
85 for (SuperKind sk: SuperKind.values()) { |
86 errors += new TestSuperclass(ck, gk, sk).run(comp, fm); |
86 errors += new TestSuperclass(ck, gk, sk).run(comp, fm); |
|
87 } |
87 } |
88 } |
88 } |
89 } |
|
90 |
|
91 if (errors > 0) |
|
92 throw new Exception(errors + " errors found"); |
89 } |
93 } |
90 |
|
91 if (errors > 0) |
|
92 throw new Exception(errors + " errors found"); |
|
93 } |
94 } |
94 |
95 |
95 final ClassKind ck; |
96 final ClassKind ck; |
96 final GenericKind gk; |
97 final GenericKind gk; |
97 final SuperKind sk; |
98 final SuperKind sk; |