< prev index next >

test/hotspot/jtreg/runtime/cds/appcds/RewriteBytecodesTest.java

Print this page

30  * @library /test/lib
31  * @compile test-classes/RewriteBytecodes.java test-classes/Util.java test-classes/Super.java test-classes/Child.java
32  * @build jdk.test.whitebox.WhiteBox
33  * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
34  * @run driver RewriteBytecodesTest
35  */
36 
37 import java.io.File;
38 import jdk.test.lib.process.OutputAnalyzer;
39 
40 public class RewriteBytecodesTest {
41   public static void main(String[] args) throws Exception {
42     String wbJar = JarBuilder.build(true, "WhiteBox", "jdk/test/whitebox/WhiteBox");
43     String use_whitebox_jar = "-Xbootclasspath/a:" + wbJar;
44 
45     String appJar = JarBuilder.build("dynamic_define", "RewriteBytecodes", "Util", "Super", "Child");
46     String superClsFile = (new File(System.getProperty("test.classes", "."), "Super.class")).getPath();
47 
48     TestCommon.dump(appJar, TestCommon.list("RewriteBytecodes", "Super", "Child"),
49                     // command-line arguments ...

50                     use_whitebox_jar);
51 
52     OutputAnalyzer output = TestCommon.exec(appJar,
53                     // command-line arguments ...
54                     use_whitebox_jar,
55                     "-XX:+UnlockDiagnosticVMOptions",
56                     "-XX:+WhiteBoxAPI",
57                     "RewriteBytecodes", superClsFile);
58     TestCommon.checkExec(output);
59   }
60 }

30  * @library /test/lib
31  * @compile test-classes/RewriteBytecodes.java test-classes/Util.java test-classes/Super.java test-classes/Child.java
32  * @build jdk.test.whitebox.WhiteBox
33  * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
34  * @run driver RewriteBytecodesTest
35  */
36 
37 import java.io.File;
38 import jdk.test.lib.process.OutputAnalyzer;
39 
40 public class RewriteBytecodesTest {
41   public static void main(String[] args) throws Exception {
42     String wbJar = JarBuilder.build(true, "WhiteBox", "jdk/test/whitebox/WhiteBox");
43     String use_whitebox_jar = "-Xbootclasspath/a:" + wbJar;
44 
45     String appJar = JarBuilder.build("dynamic_define", "RewriteBytecodes", "Util", "Super", "Child");
46     String superClsFile = (new File(System.getProperty("test.classes", "."), "Super.class")).getPath();
47 
48     TestCommon.dump(appJar, TestCommon.list("RewriteBytecodes", "Super", "Child"),
49                     // command-line arguments ...
50                     "-XX:-PreloadSharedClasses",
51                     use_whitebox_jar);
52 
53     OutputAnalyzer output = TestCommon.exec(appJar,
54                     // command-line arguments ...
55                     use_whitebox_jar,
56                     "-XX:+UnlockDiagnosticVMOptions",
57                     "-XX:+WhiteBoxAPI",
58                     "RewriteBytecodes", superClsFile);
59     TestCommon.checkExec(output);
60   }
61 }
< prev index next >