src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashMapGetTest.java
changeset 59095 03fbcd06b4c0
parent 52910 583fd71c47d6
equal deleted inserted replaced
59094:5d4c3724e4c7 59095:03fbcd06b4c0
     1 /*
     1 /*
     2  * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    50         }
    50         }
    51         test(get, null, map, 0);
    51         test(get, null, map, 0);
    52         for (IfNode ifNode : lastCompiledGraph.getNodes(IfNode.TYPE)) {
    52         for (IfNode ifNode : lastCompiledGraph.getNodes(IfNode.TYPE)) {
    53             LogicNode condition = ifNode.condition();
    53             LogicNode condition = ifNode.condition();
    54             if (ifNode.getTrueSuccessorProbability() < 0.4 && condition instanceof ObjectEqualsNode) {
    54             if (ifNode.getTrueSuccessorProbability() < 0.4 && condition instanceof ObjectEqualsNode) {
    55                 assertTrue(ifNode.trueSuccessor().next() instanceof ReturnNode, "Expected return.", ifNode.trueSuccessor(), ifNode.trueSuccessor().next());
    55                 assertTrue(ifNode.trueSuccessor().next() instanceof ReturnNode, "Expected return but got %s (trueSuccessor: %s)", ifNode.trueSuccessor().next(), ifNode.trueSuccessor());
    56             }
    56             }
    57         }
    57         }
    58     }
    58     }
    59 
    59 
    60 }
    60 }