< prev index next >

test/hotspot/jtreg/compiler/valhalla/valuetypes/ValueTypeTest.java

Print this page


 311                     nodes += matcher.group() + "\n";
 312                 }
 313                 if (matchCount[i] < 0) {
 314                     Asserts.assertLTE(Math.abs(matchCount[i]), count, "Graph for '" + testName + "' contains different number of match nodes:\n" + nodes);
 315                 } else {
 316                     Asserts.assertEQ(matchCount[i], count, "Graph for '" + testName + "' contains different number of match nodes:\n" + nodes);
 317                 }
 318             }
 319             tests.remove(testName);
 320             System.out.println(testName + " passed");
 321         }
 322         // Check if all tests were compiled
 323         if (tests.size() != 0) {
 324             for (String name : tests.keySet()) {
 325                 System.out.println("Test '" + name + "' not compiled!");
 326             }
 327             throw new RuntimeException("Not all tests were compiled");
 328         }
 329     }
 330 
 331     private void setup(Class<?> clazz) {
 332         if (XCOMP) {
 333             // Don't control compilation if -Xcomp is enabled
 334             return;
 335         }
 336         if (DUMP_REPLAY) {
 337             // Generate replay compilation files
 338             String directive = "[{ match: \"*.*\", DumpReplay: true }]";
 339             if (WHITE_BOX.addCompilerDirective(directive) != 1) {
 340                 throw new RuntimeException("Failed to add compiler directive");
 341             }
 342         }
 343 
 344         Method[] methods = clazz.getDeclaredMethods();
 345         for (Method m : methods) {
 346             if (m.isAnnotationPresent(Test.class)) {
 347                 // Don't inline tests
 348                 WHITE_BOX.testSetDontInlineMethod(m, true);
 349             }
 350             if (m.isAnnotationPresent(DontCompile.class)) {
 351                 WHITE_BOX.makeMethodNotCompilable(m, COMP_LEVEL_ANY, true);




 311                     nodes += matcher.group() + "\n";
 312                 }
 313                 if (matchCount[i] < 0) {
 314                     Asserts.assertLTE(Math.abs(matchCount[i]), count, "Graph for '" + testName + "' contains different number of match nodes:\n" + nodes);
 315                 } else {
 316                     Asserts.assertEQ(matchCount[i], count, "Graph for '" + testName + "' contains different number of match nodes:\n" + nodes);
 317                 }
 318             }
 319             tests.remove(testName);
 320             System.out.println(testName + " passed");
 321         }
 322         // Check if all tests were compiled
 323         if (tests.size() != 0) {
 324             for (String name : tests.keySet()) {
 325                 System.out.println("Test '" + name + "' not compiled!");
 326             }
 327             throw new RuntimeException("Not all tests were compiled");
 328         }
 329     }
 330 
 331     public static void setup(Class<?> clazz) {
 332         if (XCOMP) {
 333             // Don't control compilation if -Xcomp is enabled
 334             return;
 335         }
 336         if (DUMP_REPLAY) {
 337             // Generate replay compilation files
 338             String directive = "[{ match: \"*.*\", DumpReplay: true }]";
 339             if (WHITE_BOX.addCompilerDirective(directive) != 1) {
 340                 throw new RuntimeException("Failed to add compiler directive");
 341             }
 342         }
 343 
 344         Method[] methods = clazz.getDeclaredMethods();
 345         for (Method m : methods) {
 346             if (m.isAnnotationPresent(Test.class)) {
 347                 // Don't inline tests
 348                 WHITE_BOX.testSetDontInlineMethod(m, true);
 349             }
 350             if (m.isAnnotationPresent(DontCompile.class)) {
 351                 WHITE_BOX.makeMethodNotCompilable(m, COMP_LEVEL_ANY, true);


< prev index next >