langtools/test/tools/javac/T8010659/CompilerCrashWhenMixingBinariesAndSourcesTest.java
equal
deleted
inserted
replaced
25 * @test |
25 * @test |
26 * @bug 8010659 |
26 * @bug 8010659 |
27 * @summary Javac Crashes while building OpenJFX |
27 * @summary Javac Crashes while building OpenJFX |
28 * @library /tools/lib |
28 * @library /tools/lib |
29 * @modules jdk.compiler/com.sun.tools.javac.api |
29 * @modules jdk.compiler/com.sun.tools.javac.api |
30 * jdk.compiler/com.sun.tools.javac.file |
|
31 * jdk.compiler/com.sun.tools.javac.main |
30 * jdk.compiler/com.sun.tools.javac.main |
32 * jdk.jdeps/com.sun.tools.javap |
31 * @build toolbox.ToolBox toolbox.JavacTask |
33 * @build ToolBox |
|
34 * @run main CompilerCrashWhenMixingBinariesAndSourcesTest |
32 * @run main CompilerCrashWhenMixingBinariesAndSourcesTest |
35 */ |
33 */ |
|
34 |
|
35 import toolbox.JavacTask; |
|
36 import toolbox.ToolBox; |
36 |
37 |
37 public class CompilerCrashWhenMixingBinariesAndSourcesTest { |
38 public class CompilerCrashWhenMixingBinariesAndSourcesTest { |
38 private static final String ASource = |
39 private static final String ASource = |
39 "class A {\n" + |
40 "class A {\n" + |
40 " void test() {new B(){};}\n" + |
41 " void test() {new B(){};}\n" + |
51 "}"; |
52 "}"; |
52 |
53 |
53 public static void main(String[] args) throws Exception { |
54 public static void main(String[] args) throws Exception { |
54 ToolBox tb = new ToolBox(); |
55 ToolBox tb = new ToolBox(); |
55 |
56 |
56 tb.new JavacTask() |
57 new JavacTask(tb) |
57 .sources(ASource, BSource, CSource, DSource) |
58 .sources(ASource, BSource, CSource, DSource) |
58 .run(); |
59 .run(); |
59 |
60 |
60 tb.deleteFiles("A.class", "A$1.class", "C.class", "D.class"); |
61 tb.deleteFiles("A.class", "A$1.class", "C.class", "D.class"); |
61 |
62 |
62 tb.new JavacTask() |
63 new JavacTask(tb) |
63 .classpath(".") |
64 .classpath(".") |
64 .sources(ASource, CSource, DSource) |
65 .sources(ASource, CSource, DSource) |
65 .run(); |
66 .run(); |
66 } |
67 } |
67 } |
68 } |