langtools/test/tools/javah/6257087/T6257087.java
changeset 16549 1bdeedb5446c
parent 16304 475504933a2d
child 26100 bb7dd001d190
equal deleted inserted replaced
16548:d55a654e2751 16549:1bdeedb5446c
    30  * @run main T6257087
    30  * @run main T6257087
    31  */
    31  */
    32 
    32 
    33 import java.nio.file.Paths;
    33 import java.nio.file.Paths;
    34 
    34 
    35 //original test: test/tools/javah/6257087/foo.sh
       
    36 public class T6257087 {
    35 public class T6257087 {
    37 
    36 
    38     private static final String fooBarGoldenFile =
    37     private static final String fooBarGoldenFile =
    39         "/* DO NOT EDIT THIS FILE - it is machine generated */\n" +
    38         "/* DO NOT EDIT THIS FILE - it is machine generated */\n" +
    40         "#include <jni.h>\n" +
    39         "#include <jni.h>\n" +
    57         "}\n" +
    56         "}\n" +
    58         "#endif\n" +
    57         "#endif\n" +
    59         "#endif";
    58         "#endif";
    60 
    59 
    61     public static void main(String[] args) throws Exception {
    60     public static void main(String[] args) throws Exception {
    62 //        "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d "${TC}" "${TS}${FS}foo.java"
       
    63 
       
    64 //        "${TESTJAVA}${FS}bin${FS}javah" ${TESTTOOLVMOPTS} -classpath "${TC}" -d "${TC}" foo
       
    65         ToolBox.JavaToolArgs javahArgs =
    61         ToolBox.JavaToolArgs javahArgs =
    66                 new ToolBox.JavaToolArgs()
    62                 new ToolBox.JavaToolArgs()
    67                 .setAllArgs("-cp", System.getProperty("test.classes"), "foo");
    63                 .setAllArgs("-cp", System.getProperty("test.classes"), "foo");
    68         ToolBox.javah(javahArgs);
    64         ToolBox.javah(javahArgs);
    69 
    65 
    70 //        diff ${DIFFOPTS} -c "${TS}${FS}foo_bar.h" "${TC}${FS}foo_bar.h"
       
    71         ToolBox.compareLines(Paths.get("foo_bar.h"),
    66         ToolBox.compareLines(Paths.get("foo_bar.h"),
    72                 ToolBox.splitLines(fooBarGoldenFile), null);
    67                 ToolBox.splitLines(fooBarGoldenFile, "\n"), null, true);
    73     }
    68     }
    74 
    69 
    75 }
    70 }
    76 
    71 
    77 class foo {
    72 class foo {