src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java
changeset 58877 aec7bf35d6f5
parent 58299 6df94ce3ab2f
equal deleted inserted replaced
58876:1a8d65e71a66 58877:aec7bf35d6f5
    25 package org.graalvm.compiler.core.test;
    25 package org.graalvm.compiler.core.test;
    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.phases.common.CanonicalizerPhase;
       
    31 import org.junit.Test;
    30 import org.junit.Test;
    32 
    31 
    33 public class StraighteningTest extends GraalCompilerTest {
    32 public class StraighteningTest extends GraalCompilerTest {
    34 
    33 
    35     private static final String REFERENCE_SNIPPET = "ref";
    34     private static final String REFERENCE_SNIPPET = "ref";
    88     private void test(final String snippet) {
    87     private void test(final String snippet) {
    89         // No debug scope to reduce console noise for @Test(expected = ...) tests
    88         // No debug scope to reduce console noise for @Test(expected = ...) tests
    90         StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
    89         StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
    91         DebugContext debug = graph.getDebug();
    90         DebugContext debug = graph.getDebug();
    92         debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
    91         debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
    93         new CanonicalizerPhase().apply(graph, getProviders());
    92         createCanonicalizerPhase().apply(graph, getProviders());
    94         StructuredGraph referenceGraph = parseEager(REFERENCE_SNIPPET, AllowAssumptions.YES);
    93         StructuredGraph referenceGraph = parseEager(REFERENCE_SNIPPET, AllowAssumptions.YES);
    95         assertEquals(referenceGraph, graph);
    94         assertEquals(referenceGraph, graph);
    96     }
    95     }
    97 }
    96 }