langtools/test/tools/sjavac/CompileExcludingDependency.java
changeset 40308 274367a99f98
parent 36778 e04318f39f92
equal deleted inserted replaced
40306:1a0fcaf3f2ed 40308:274367a99f98
    29  * @author sogoel (rewrite)
    29  * @author sogoel (rewrite)
    30  * @library /tools/lib
    30  * @library /tools/lib
    31  * @modules jdk.compiler/com.sun.tools.javac.api
    31  * @modules jdk.compiler/com.sun.tools.javac.api
    32  *          jdk.compiler/com.sun.tools.javac.main
    32  *          jdk.compiler/com.sun.tools.javac.main
    33  *          jdk.compiler/com.sun.tools.sjavac
    33  *          jdk.compiler/com.sun.tools.sjavac
    34  *          jdk.jdeps/com.sun.tools.javap
       
    35  * @build Wrapper toolbox.ToolBox
    34  * @build Wrapper toolbox.ToolBox
    36  * @run main Wrapper CompileExcludingDependency
    35  * @run main Wrapper CompileExcludingDependency
    37  */
    36  */
    38 
    37 
    39 import java.util.*;
    38 import java.util.*;
    47 
    46 
    48     // Verify that excluding classes from compilation but not from linking works
    47     // Verify that excluding classes from compilation but not from linking works
    49     void test() throws Exception {
    48     void test() throws Exception {
    50         Files.createDirectories(BIN);
    49         Files.createDirectories(BIN);
    51         Map<String,Long> previous_bin_state = collectState(BIN);
    50         Map<String,Long> previous_bin_state = collectState(BIN);
    52         ToolBox tb = new ToolBox();
       
    53         tb.writeFile(GENSRC.resolve("alfa/omega/A.java"),
    51         tb.writeFile(GENSRC.resolve("alfa/omega/A.java"),
    54                      "package alfa.omega; public class A { beta.B b; }");
    52                      "package alfa.omega; public class A { beta.B b; }");
    55         tb.writeFile(GENSRC.resolve("beta/B.java"),
    53         tb.writeFile(GENSRC.resolve("beta/B.java"),
    56                      "package beta; public class B { }");
    54                      "package beta; public class B { }");
    57 
    55