test/hotspot/jtreg/runtime/appcds/OldClassTest.java
changeset 51507 3e3764f8fe36
parent 48979 514c73a1955b
child 51990 6003e034cdd8
equal deleted inserted replaced
51506:71c3b8c51977 51507:3e3764f8fe36
    65     OutputAnalyzer output = TestCommon.dump(jar, appClasses);
    65     OutputAnalyzer output = TestCommon.dump(jar, appClasses);
    66     TestCommon.checkExecReturn(output, 0, true, "Pre JDK 1.5 class not supported by CDS");
    66     TestCommon.checkExecReturn(output, 0, true, "Pre JDK 1.5 class not supported by CDS");
    67 
    67 
    68     TestCommon.run(
    68     TestCommon.run(
    69         "-cp", jar,
    69         "-cp", jar,
    70         "-verbose:class",
       
    71         "Hello")
    70         "Hello")
    72       .assertNormalExit("Hello Unicode world (Old)");
    71       .assertNormalExit("Hello Unicode world (Old)");
    73 
    72 
    74     // CASE 2: if we exlcude old version of this class, we should not pick up
    73     // CASE 2: if we exlcude old version of this class, we should not pick up
    75     //         the newer version of this class in a subsequent classpath element.
    74     //         the newer version of this class in a subsequent classpath element.
    77     output = TestCommon.dump(classpath, appClasses);
    76     output = TestCommon.dump(classpath, appClasses);
    78     TestCommon.checkExecReturn(output, 0, true, "Pre JDK 1.5 class not supported by CDS");
    77     TestCommon.checkExecReturn(output, 0, true, "Pre JDK 1.5 class not supported by CDS");
    79 
    78 
    80     TestCommon.run(
    79     TestCommon.run(
    81         "-cp", classpath,
    80         "-cp", classpath,
    82         "-verbose:class",
       
    83         "Hello")
    81         "Hello")
    84       .assertNormalExit("Hello Unicode world (Old)");
    82       .assertNormalExit("Hello Unicode world (Old)");
    85   }
    83   }
    86 
    84 
    87   static void createTestJarFile(File jarSrcFile, File jarFile) throws Exception {
    85   static void createTestJarFile(File jarSrcFile, File jarFile) throws Exception {