comparison test/compiler/whitebox/SetDontInlineMethodTest.java @ 9080:b84fd7d73702

8007288: Additional WB API for compiler's testing Reviewed-by: kvn, vlivanov
author iignatyev
date Tue, 09 Apr 2013 09:54:17 -0700
parents 1b0dc9f87e75
children 4b2eebe03f93
comparison
equal deleted inserted replaced
9079:f67065f02409 9080:b84fd7d73702
34 public static void main(String[] args) throws Exception { 34 public static void main(String[] args) throws Exception {
35 new SetDontInlineMethodTest().runTest(); 35 new SetDontInlineMethodTest().runTest();
36 } 36 }
37 37
38 protected void test() throws Exception { 38 protected void test() throws Exception {
39 if (WHITE_BOX.setDontInlineMethod(METHOD, true)) { 39 if (WHITE_BOX.testSetDontInlineMethod(METHOD, true)) {
40 throw new RuntimeException("on start " + METHOD 40 throw new RuntimeException("on start " + METHOD
41 + " must be inlineable"); 41 + " must be inlineable");
42 } 42 }
43 if (!WHITE_BOX.setDontInlineMethod(METHOD, true)) { 43 if (!WHITE_BOX.testSetDontInlineMethod(METHOD, true)) {
44 throw new RuntimeException("after first change to true " + METHOD 44 throw new RuntimeException("after first change to true " + METHOD
45 + " must be not inlineable"); 45 + " must be not inlineable");
46 } 46 }
47 if (!WHITE_BOX.setDontInlineMethod(METHOD, false)) { 47 if (!WHITE_BOX.testSetDontInlineMethod(METHOD, false)) {
48 throw new RuntimeException("after second change to true " + METHOD 48 throw new RuntimeException("after second change to true " + METHOD
49 + " must be still not inlineable"); 49 + " must be still not inlineable");
50 } 50 }
51 if (WHITE_BOX.setDontInlineMethod(METHOD, false)) { 51 if (WHITE_BOX.testSetDontInlineMethod(METHOD, false)) {
52 throw new RuntimeException("after first change to false" + METHOD 52 throw new RuntimeException("after first change to false" + METHOD
53 + " must be inlineable"); 53 + " must be inlineable");
54 } 54 }
55 if (WHITE_BOX.setDontInlineMethod(METHOD, false)) { 55 if (WHITE_BOX.testSetDontInlineMethod(METHOD, false)) {
56 throw new RuntimeException("after second change to false " + METHOD 56 throw new RuntimeException("after second change to false " + METHOD
57 + " must be inlineable"); 57 + " must be inlineable");
58 } 58 }
59 } 59 }
60 } 60 }