Mercurial > hg > graal-compiler
comparison test/compiler/whitebox/MakeMethodNotCompilableTest.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 | 4efac99a998b |
children | 4b2eebe03f93 |
comparison
equal
deleted
inserted
replaced
9079:f67065f02409 | 9080:b84fd7d73702 |
---|---|
31 */ | 31 */ |
32 public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest { | 32 public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest { |
33 | 33 |
34 public static void main(String[] args) throws Exception { | 34 public static void main(String[] args) throws Exception { |
35 // to prevent inlining #method into #compile() | 35 // to prevent inlining #method into #compile() |
36 WHITE_BOX.setDontInlineMethod(METHOD, true); | 36 WHITE_BOX.testSetDontInlineMethod(METHOD, true); |
37 new MakeMethodNotCompilableTest().runTest(); | 37 new MakeMethodNotCompilableTest().runTest(); |
38 } | 38 } |
39 | 39 |
40 protected void test() throws Exception { | 40 protected void test() throws Exception { |
41 if (!WHITE_BOX.isMethodCompilable(METHOD)) { | 41 if (!WHITE_BOX.isMethodCompilable(METHOD)) { |
44 WHITE_BOX.makeMethodNotCompilable(METHOD); | 44 WHITE_BOX.makeMethodNotCompilable(METHOD); |
45 if (WHITE_BOX.isMethodCompilable(METHOD)) { | 45 if (WHITE_BOX.isMethodCompilable(METHOD)) { |
46 throw new RuntimeException(METHOD + " must be not compilable"); | 46 throw new RuntimeException(METHOD + " must be not compilable"); |
47 } | 47 } |
48 compile(); | 48 compile(); |
49 if (WHITE_BOX.isMethodQueuedForCompilation(METHOD)) { | |
50 throw new RuntimeException(METHOD + " must not be in queue"); | |
51 } | |
52 checkNotCompiled(METHOD); | 49 checkNotCompiled(METHOD); |
53 if (WHITE_BOX.isMethodCompilable(METHOD)) { | 50 if (WHITE_BOX.isMethodCompilable(METHOD)) { |
54 throw new RuntimeException(METHOD + " must be not compilable"); | 51 throw new RuntimeException(METHOD + " must be not compilable"); |
55 } | 52 } |
56 } | 53 } |