Mercurial > hg > truffle
comparison test/compiler/whitebox/SetForceInlineMethodTest.java @ 10423:a6697eaddebd
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 21:54:38 +0200 |
parents | 4b2eebe03f93 |
children | 11237ee74aae |
comparison
equal
deleted
inserted
replaced
10422:a47dd157277e | 10423:a6697eaddebd |
---|---|
25 * @test SetForceInlineMethodTest | 25 * @test SetForceInlineMethodTest |
26 * @library /testlibrary /testlibrary/whitebox | 26 * @library /testlibrary /testlibrary/whitebox |
27 * @build SetForceInlineMethodTest | 27 * @build SetForceInlineMethodTest |
28 * @run main ClassFileInstaller sun.hotspot.WhiteBox | 28 * @run main ClassFileInstaller sun.hotspot.WhiteBox |
29 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI SetForceInlineMethodTest | 29 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI SetForceInlineMethodTest |
30 * @summary testing of WB::testSetForceInlineMethod() | |
30 * @author igor.ignatyev@oracle.com | 31 * @author igor.ignatyev@oracle.com |
31 */ | 32 */ |
32 public class SetForceInlineMethodTest extends CompilerWhiteBoxTest { | 33 public class SetForceInlineMethodTest extends CompilerWhiteBoxTest { |
33 | 34 |
34 public static void main(String[] args) throws Exception { | 35 public static void main(String[] args) throws Exception { |
35 new SetForceInlineMethodTest().runTest(); | 36 for (TestCase test : TestCase.values()) { |
37 new SetForceInlineMethodTest(test).runTest(); | |
38 } | |
36 } | 39 } |
37 | 40 |
41 public SetForceInlineMethodTest(TestCase testCase) { | |
42 super(testCase); | |
43 } | |
44 | |
45 /** | |
46 * Tests {@code WB::testSetForceInlineMethod()} by sequential calling it and | |
47 * checking of return value. | |
48 * | |
49 * @throws Exception if one of the checks fails. | |
50 */ | |
51 @Override | |
38 protected void test() throws Exception { | 52 protected void test() throws Exception { |
39 if (WHITE_BOX.testSetForceInlineMethod(METHOD, true)) { | 53 if (WHITE_BOX.testSetForceInlineMethod(method, true)) { |
40 throw new RuntimeException("on start " + METHOD | 54 throw new RuntimeException("on start " + method |
41 + " must be not force inlineable"); | 55 + " must be not force inlineable"); |
42 } | 56 } |
43 if (!WHITE_BOX.testSetForceInlineMethod(METHOD, true)) { | 57 if (!WHITE_BOX.testSetForceInlineMethod(method, true)) { |
44 throw new RuntimeException("after first change to true " + METHOD | 58 throw new RuntimeException("after first change to true " + method |
45 + " must be force inlineable"); | 59 + " must be force inlineable"); |
46 } | 60 } |
47 if (!WHITE_BOX.testSetForceInlineMethod(METHOD, false)) { | 61 if (!WHITE_BOX.testSetForceInlineMethod(method, false)) { |
48 throw new RuntimeException("after second change to true " + METHOD | 62 throw new RuntimeException("after second change to true " + method |
49 + " must be still force inlineable"); | 63 + " must be still force inlineable"); |
50 } | 64 } |
51 if (WHITE_BOX.testSetForceInlineMethod(METHOD, false)) { | 65 if (WHITE_BOX.testSetForceInlineMethod(method, false)) { |
52 throw new RuntimeException("after first change to false" + METHOD | 66 throw new RuntimeException("after first change to false" + method |
53 + " must be not force inlineable"); | 67 + " must be not force inlineable"); |
54 } | 68 } |
55 if (WHITE_BOX.testSetForceInlineMethod(METHOD, false)) { | 69 if (WHITE_BOX.testSetForceInlineMethod(method, false)) { |
56 throw new RuntimeException("after second change to false " + METHOD | 70 throw new RuntimeException("after second change to false " + method |
57 + " must be not force inlineable"); | 71 + " must be not force inlineable"); |
58 } | 72 } |
59 } | 73 } |
60 } | 74 } |