Mercurial > hg > truffle
diff test/compiler/whitebox/SetDontInlineMethodTest.java @ 10423:a6697eaddebd
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 21:54:38 +0200 |
parents | 4b2eebe03f93 |
children | 11237ee74aae |
line wrap: on
line diff
--- a/test/compiler/whitebox/SetDontInlineMethodTest.java Wed Jun 19 21:49:09 2013 +0200 +++ b/test/compiler/whitebox/SetDontInlineMethodTest.java Wed Jun 19 21:54:38 2013 +0200 @@ -27,33 +27,47 @@ * @build SetDontInlineMethodTest * @run main ClassFileInstaller sun.hotspot.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI SetDontInlineMethodTest + * @summary testing of WB::testSetDontInlineMethod() * @author igor.ignatyev@oracle.com */ public class SetDontInlineMethodTest extends CompilerWhiteBoxTest { public static void main(String[] args) throws Exception { - new SetDontInlineMethodTest().runTest(); + for (TestCase test : TestCase.values()) { + new SetDontInlineMethodTest(test).runTest(); + } + } + + public SetDontInlineMethodTest(TestCase testCase) { + super(testCase); } + /** + * Tests {@code WB::testSetDontInlineMethod()} by sequential calling it and + * checking of return value. + * + * @throws Exception if one of the checks fails. + */ + @Override protected void test() throws Exception { - if (WHITE_BOX.testSetDontInlineMethod(METHOD, true)) { - throw new RuntimeException("on start " + METHOD + if (WHITE_BOX.testSetDontInlineMethod(method, true)) { + throw new RuntimeException("on start " + method + " must be inlineable"); } - if (!WHITE_BOX.testSetDontInlineMethod(METHOD, true)) { - throw new RuntimeException("after first change to true " + METHOD + if (!WHITE_BOX.testSetDontInlineMethod(method, true)) { + throw new RuntimeException("after first change to true " + method + " must be not inlineable"); } - if (!WHITE_BOX.testSetDontInlineMethod(METHOD, false)) { - throw new RuntimeException("after second change to true " + METHOD + if (!WHITE_BOX.testSetDontInlineMethod(method, false)) { + throw new RuntimeException("after second change to true " + method + " must be still not inlineable"); } - if (WHITE_BOX.testSetDontInlineMethod(METHOD, false)) { - throw new RuntimeException("after first change to false" + METHOD + if (WHITE_BOX.testSetDontInlineMethod(method, false)) { + throw new RuntimeException("after first change to false" + method + " must be inlineable"); } - if (WHITE_BOX.testSetDontInlineMethod(METHOD, false)) { - throw new RuntimeException("after second change to false " + METHOD + if (WHITE_BOX.testSetDontInlineMethod(method, false)) { + throw new RuntimeException("after second change to false " + method + " must be inlineable"); } }