equal
deleted
inserted
replaced
34 * @library /tools/lib |
34 * @library /tools/lib |
35 * @build Wrapper toolbox.ToolBox |
35 * @build Wrapper toolbox.ToolBox |
36 * @run main Wrapper HiddenFiles |
36 * @run main Wrapper HiddenFiles |
37 */ |
37 */ |
38 |
38 |
|
39 import com.sun.tools.javac.main.Main.Result; |
39 import com.sun.tools.javac.util.Assert; |
40 import com.sun.tools.javac.util.Assert; |
40 import com.sun.tools.sjavac.server.Sjavac; |
41 import com.sun.tools.sjavac.server.Sjavac; |
41 |
42 |
42 import java.nio.file.Files; |
43 import java.nio.file.Files; |
43 import java.nio.file.Path; |
44 import java.nio.file.Path; |
60 // is excluded. |
61 // is excluded. |
61 int rc = compile("-x", "pkg/B.java", SRC.toString(), |
62 int rc = compile("-x", "pkg/B.java", SRC.toString(), |
62 "-d", BIN.toString(), |
63 "-d", BIN.toString(), |
63 "--state-dir=" + STATE_DIR); |
64 "--state-dir=" + STATE_DIR); |
64 |
65 |
65 Assert.check(rc == Sjavac.RC_FATAL, "Compilation succeeded unexpectedly."); |
66 Assert.check(rc == Result.ERROR.exitCode, "Compilation succeeded unexpectedly."); |
66 } |
67 } |
67 } |
68 } |