use of org.graalvm.compiler.truffle.test.nodes.StringHashCodeFinalNode in project graal by oracle.
the class SimplePartialEvaluationTest method intrinsicStringHashCodeFinal.
@Test
public void intrinsicStringHashCodeFinal() {
/* The intrinsic for String.hashcode() triggers on constant strings. */
FrameDescriptor fd = new FrameDescriptor();
AbstractTestNode result = new StringHashCodeFinalNode("*");
/* The hash code of "*" is 42. */
assertPartialEvalEquals("constant42", new RootTestNode(fd, "intrinsicStringHashCodeFinal", result));
}
Aggregations