--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java 2017-03-20 17:37:56.000000000 -0700 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java 2017-03-20 17:37:56.000000000 -0700 @@ -31,13 +31,14 @@ import org.junit.Test; import org.graalvm.compiler.api.test.Graal; +import org.graalvm.compiler.debug.Assertions; import org.graalvm.compiler.graph.Graph; import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.graph.NodeClass; import org.graalvm.compiler.graph.NodeMap; import org.graalvm.compiler.nodeinfo.NodeInfo; -public class NodeMapTest { +public class NodeMapTest extends GraphTest { @NodeInfo(cycles = CYCLES_IGNORED, size = SIZE_IGNORED) static final class TestNode extends Node { @@ -57,7 +58,7 @@ // Need to initialize HotSpotGraalRuntime before any Node class is initialized. Graal.getRuntime(); - graph = new Graph(); + graph = new Graph(getOptions()); for (int i = 0; i < nodes.length; i++) { nodes[i] = graph.add(new TestNode()); } @@ -107,13 +108,6 @@ } } - @SuppressWarnings("all") - private static boolean assertionsEnabled() { - boolean assertionsEnabled = false; - assert assertionsEnabled = true; - return assertionsEnabled; - } - @Test public void testNewGet() { /* @@ -123,7 +117,7 @@ TestNode newNode = graph.add(new TestNode()); try { map.get(newNode); - fail("expected " + (assertionsEnabled() ? AssertionError.class.getSimpleName() : ArrayIndexOutOfBoundsException.class.getSimpleName())); + fail("expected " + (Assertions.ENABLED ? AssertionError.class.getSimpleName() : ArrayIndexOutOfBoundsException.class.getSimpleName())); } catch (AssertionError ae) { // thrown when assertions are enabled } catch (ArrayIndexOutOfBoundsException e) { @@ -140,7 +134,7 @@ TestNode newNode = graph.add(new TestNode()); try { map.set(newNode, 1); - fail("expected " + (assertionsEnabled() ? AssertionError.class.getSimpleName() : ArrayIndexOutOfBoundsException.class.getSimpleName())); + fail("expected " + (Assertions.ENABLED ? AssertionError.class.getSimpleName() : ArrayIndexOutOfBoundsException.class.getSimpleName())); } catch (AssertionError ae) { // thrown when assertions are enabled } catch (ArrayIndexOutOfBoundsException e) {