langtools/test/tools/javah/constMacroTest/ConstMacroTest.java
changeset 36778 e04318f39f92
parent 36526 3b41f1c69604
child 36991 7f814aac1f80
equal deleted inserted replaced
36777:28d33fb9097f 36778:e04318f39f92
    27  * @summary Validates rewritten javah handling of class defined constants and
    27  * @summary Validates rewritten javah handling of class defined constants and
    28  * ensures that the appropriate macro definitions are placed in the generated
    28  * ensures that the appropriate macro definitions are placed in the generated
    29  * header file.
    29  * header file.
    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.file
       
    33  *          jdk.compiler/com.sun.tools.javac.main
    32  *          jdk.compiler/com.sun.tools.javac.main
    34  *          jdk.jdeps/com.sun.tools.javap
    33  *          jdk.jdeps/com.sun.tools.javap
    35  * @build ToolBox
    34  * @build toolbox.ToolBox toolbox.JavahTask
    36  * @run main ConstMacroTest
    35  * @run main ConstMacroTest
    37  */
    36  */
    38 
    37 
    39 import java.io.*;
    38 import java.io.*;
    40 import java.util.List;
    39 import java.util.List;
       
    40 
       
    41 import toolbox.JavahTask;
       
    42 import toolbox.ToolBox;
    41 
    43 
    42 // Original test: test/tools/javah/ConstMacroTest.sh
    44 // Original test: test/tools/javah/ConstMacroTest.sh
    43 public class ConstMacroTest {
    45 public class ConstMacroTest {
    44 
    46 
    45     private static final String subClassConstsGoldenFileTemplate =
    47     private static final String subClassConstsGoldenFileTemplate =
    76         "#endif";
    78         "#endif";
    77 
    79 
    78     public static void main(String[] args) throws Exception {
    80     public static void main(String[] args) throws Exception {
    79         ToolBox tb = new ToolBox();
    81         ToolBox tb = new ToolBox();
    80 
    82 
    81         tb.new JavahTask()
    83         new JavahTask(tb)
    82                 .classpath(ToolBox.testClasses)
    84                 .classpath(ToolBox.testClasses)
    83                 .classes("SubClassConsts")
    85                 .classes("SubClassConsts")
    84                 .run();
    86                 .run();
    85 
    87 
    86         String longSuffix = tb.isWindows() ? "i64" : "LL";
    88         String longSuffix = tb.isWindows() ? "i64" : "LL";