Mercurial > hg > graal-compiler
comparison test/compiler/whitebox/MakeMethodNotCompilableTest.java @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | f9a4b59ae350 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
25 * @test MakeMethodNotCompilableTest | 25 * @test MakeMethodNotCompilableTest |
26 * @bug 8012322 8006683 8007288 8022832 | 26 * @bug 8012322 8006683 8007288 8022832 |
27 * @library /testlibrary /testlibrary/whitebox | 27 * @library /testlibrary /testlibrary/whitebox |
28 * @build MakeMethodNotCompilableTest | 28 * @build MakeMethodNotCompilableTest |
29 * @run main ClassFileInstaller sun.hotspot.WhiteBox | 29 * @run main ClassFileInstaller sun.hotspot.WhiteBox |
30 * @run main/othervm/timeout=2400 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* MakeMethodNotCompilableTest | 30 * @run main/othervm/timeout=2400 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,TestCase$Helper::* MakeMethodNotCompilableTest |
31 * @summary testing of WB::makeMethodNotCompilable() | 31 * @summary testing of WB::makeMethodNotCompilable() |
32 * @author igor.ignatyev@oracle.com | 32 * @author igor.ignatyev@oracle.com |
33 */ | 33 */ |
34 public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest { | 34 public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest { |
35 private int bci; | 35 private int bci; |
36 public static void main(String[] args) throws Exception { | 36 public static void main(String[] args) throws Exception { |
37 CompilerWhiteBoxTest.main(MakeMethodNotCompilableTest::new, args); | 37 if (args.length == 0) { |
38 } | 38 for (TestCase test : TestCase.values()) { |
39 | 39 new MakeMethodNotCompilableTest(test).runTest(); |
40 private MakeMethodNotCompilableTest(TestCase testCase) { | 40 } |
41 } else { | |
42 for (String name : args) { | |
43 new MakeMethodNotCompilableTest( | |
44 TestCase.valueOf(name)).runTest(); | |
45 } | |
46 } | |
47 } | |
48 | |
49 public MakeMethodNotCompilableTest(TestCase testCase) { | |
41 super(testCase); | 50 super(testCase); |
42 // to prevent inlining of #method | 51 // to prevent inlining of #method |
43 WHITE_BOX.testSetDontInlineMethod(method, true); | 52 WHITE_BOX.testSetDontInlineMethod(method, true); |
44 } | 53 } |
45 | 54 |
51 * | 60 * |
52 * @throws Exception if one of the checks fails. | 61 * @throws Exception if one of the checks fails. |
53 */ | 62 */ |
54 @Override | 63 @Override |
55 protected void test() throws Exception { | 64 protected void test() throws Exception { |
56 if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith( | 65 if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith( |
57 "compiled ")) { | 66 "compiled ")) { |
58 System.err.printf("Warning: %s is not applicable in %s%n", | 67 System.err.printf("Warning: %s is not applicable in %s%n", |
59 testCase.name(), CompilerWhiteBoxTest.MODE); | 68 testCase.name(), CompilerWhiteBoxTest.MODE); |
60 return; | 69 return; |
61 } | 70 } |