src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java
equal
deleted
inserted
replaced
26 |
26 |
27 import org.graalvm.compiler.debug.DebugContext; |
27 import org.graalvm.compiler.debug.DebugContext; |
28 import org.graalvm.compiler.nodes.StructuredGraph; |
28 import org.graalvm.compiler.nodes.StructuredGraph; |
29 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions; |
29 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions; |
30 import org.graalvm.compiler.nodes.spi.CoreProviders; |
30 import org.graalvm.compiler.nodes.spi.CoreProviders; |
31 import org.graalvm.compiler.phases.common.CanonicalizerPhase; |
|
32 import org.junit.Test; |
31 import org.junit.Test; |
33 |
32 |
34 /** |
33 /** |
35 * In the following tests, the scalar type system of the compiler should be complete enough to see |
34 * In the following tests, the scalar type system of the compiler should be complete enough to see |
36 * the relation between the different conditions. |
35 * the relation between the different conditions. |
132 private void test(final String snippet, final String referenceSnippet) { |
131 private void test(final String snippet, final String referenceSnippet) { |
133 // No debug scope to reduce console noise for @Test(expected = ...) tests |
132 // No debug scope to reduce console noise for @Test(expected = ...) tests |
134 StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO); |
133 StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO); |
135 graph.getDebug().dump(DebugContext.BASIC_LEVEL, graph, "Graph"); |
134 graph.getDebug().dump(DebugContext.BASIC_LEVEL, graph, "Graph"); |
136 CoreProviders context = getProviders(); |
135 CoreProviders context = getProviders(); |
137 new CanonicalizerPhase().apply(graph, context); |
136 createCanonicalizerPhase().apply(graph, context); |
138 StructuredGraph referenceGraph = parseEager(referenceSnippet, AllowAssumptions.NO); |
137 StructuredGraph referenceGraph = parseEager(referenceSnippet, AllowAssumptions.NO); |
139 assertEquals(referenceGraph, graph); |
138 assertEquals(referenceGraph, graph); |
140 } |
139 } |
141 } |
140 } |