equal
deleted
inserted
replaced
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
|
26 * @bug 8006694 |
26 * @summary Automatic test for checking correctness of default super/this resolution |
27 * @summary Automatic test for checking correctness of default super/this resolution |
|
28 * temporarily workaround combo tests are causing time out in several platforms |
27 * @library ../../lib |
29 * @library ../../lib |
28 * @build JavacTestingAbstractThreadedTest |
30 * @build JavacTestingAbstractThreadedTest |
29 * @run main TestDefaultSuperCall |
31 * @run main/othervm TestDefaultSuperCall |
30 */ |
32 */ |
|
33 |
|
34 // use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047) |
|
35 // see JDK-8006746 |
31 |
36 |
32 import java.net.URI; |
37 import java.net.URI; |
33 import java.util.Arrays; |
38 import java.util.Arrays; |
34 import java.util.ArrayList; |
39 import java.util.ArrayList; |
35 import java.util.List; |
40 import java.util.List; |
36 import java.util.Locale; |
|
37 import javax.tools.Diagnostic; |
41 import javax.tools.Diagnostic; |
38 import javax.tools.JavaFileObject; |
42 import javax.tools.JavaFileObject; |
39 import javax.tools.SimpleJavaFileObject; |
43 import javax.tools.SimpleJavaFileObject; |
40 |
44 |
41 import com.sun.source.util.JavacTask; |
45 import com.sun.source.util.JavacTask; |
210 List<ElementKind> enclosingElements; |
214 List<ElementKind> enclosingElements; |
211 List<String> enclosingNames; |
215 List<String> enclosingNames; |
212 List<String> elementsWithMethod; |
216 List<String> elementsWithMethod; |
213 |
217 |
214 Shape(ElementKind... elements) { |
218 Shape(ElementKind... elements) { |
215 errWriter.println("elements = " + Arrays.toString(elements)); |
|
216 enclosingElements = new ArrayList<>(); |
219 enclosingElements = new ArrayList<>(); |
217 enclosingNames = new ArrayList<>(); |
220 enclosingNames = new ArrayList<>(); |
218 elementsWithMethod = new ArrayList<>(); |
221 elementsWithMethod = new ArrayList<>(); |
219 int count = 0; |
222 int count = 0; |
220 String prevName = null; |
223 String prevName = null; |
404 |
407 |
405 boolean errorFound; |
408 boolean errorFound; |
406 |
409 |
407 public void report(Diagnostic<? extends JavaFileObject> diagnostic) { |
410 public void report(Diagnostic<? extends JavaFileObject> diagnostic) { |
408 if (diagnostic.getKind() == Diagnostic.Kind.ERROR) { |
411 if (diagnostic.getKind() == Diagnostic.Kind.ERROR) { |
409 errWriter.println(diagnostic.getMessage(Locale.getDefault())); |
|
410 errorFound = true; |
412 errorFound = true; |
411 } |
413 } |
412 } |
414 } |
413 } |
415 } |
414 |
416 |