< prev index next >

langtools/test/tools/javah/constMacroTest/ConstMacroTest.java

Print this page




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4786406 4781221 4780341 6214324
  27  * @summary Validates rewritten javah handling of class defined constants and
  28  * ensures that the appropriate macro definitions are placed in the generated
  29  * header file.
  30  * @library /tools/lib
  31  * @modules jdk.compiler/com.sun.tools.javac.api
  32  *          jdk.compiler/com.sun.tools.javac.main
  33  *          jdk.jdeps/com.sun.tools.javap
  34  * @build toolbox.ToolBox toolbox.JavahTask
  35  * @run main ConstMacroTest
  36  */
  37 
  38 import java.io.*;
  39 import java.util.List;
  40 
  41 import toolbox.JavahTask;
  42 import toolbox.ToolBox;
  43 
  44 // Original test: test/tools/javah/ConstMacroTest.sh
  45 public class ConstMacroTest {
  46 
  47     private static final String subClassConstsGoldenFileTemplate =
  48         "/* DO NOT EDIT THIS FILE - it is machine generated */\n" +
  49         "#include <jni.h>\n" +
  50         "/* Header for class SubClassConsts */\n" +
  51         "\n" +
  52         "#ifndef _Included_SubClassConsts\n" +
  53         "#define _Included_SubClassConsts\n" +




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4786406 4781221 4780341 6214324
  27  * @summary Validates rewritten javah handling of class defined constants and
  28  * ensures that the appropriate macro definitions are placed in the generated
  29  * header file.
  30  * @library /tools/lib
  31  * @modules jdk.compiler/com.sun.tools.javac.api
  32  *          jdk.compiler/com.sun.tools.javac.main
  33  *          jdk.compiler/com.sun.tools.javah
  34  * @build toolbox.ToolBox toolbox.JavahTask
  35  * @run main ConstMacroTest
  36  */
  37 
  38 import java.io.*;
  39 import java.util.List;
  40 
  41 import toolbox.JavahTask;
  42 import toolbox.ToolBox;
  43 
  44 // Original test: test/tools/javah/ConstMacroTest.sh
  45 public class ConstMacroTest {
  46 
  47     private static final String subClassConstsGoldenFileTemplate =
  48         "/* DO NOT EDIT THIS FILE - it is machine generated */\n" +
  49         "#include <jni.h>\n" +
  50         "/* Header for class SubClassConsts */\n" +
  51         "\n" +
  52         "#ifndef _Included_SubClassConsts\n" +
  53         "#define _Included_SubClassConsts\n" +


< prev index next >