use of com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode in project graal by oracle.
the class CachedTest method testChildrenAdoption2.
@Test
public void testChildrenAdoption2() {
ChildrenAdoption2 root = createNode(ChildrenAdoption2Factory.getInstance(), false);
Node child = new ValueNode();
root.execute(child);
root.adoptChildren();
Assert.assertTrue(hasParent(root, child));
}
use of com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode in project graal by oracle.
the class CachedTest method testChildrenAdoption6.
@Test
public void testChildrenAdoption6() {
ChildrenAdoption6 root = createNode(ChildrenAdoption6Factory.getInstance(), false);
Node child = new ValueNode();
root.execute(child);
Assert.assertTrue(hasParent(root, child));
}
use of com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode in project graal by oracle.
the class NodeChildNoNameTest method testTwoArg.
@Test
public void testTwoArg() {
ValueNode node1 = new ConstantNode();
ValueNode node2 = new ConstantNode();
TwoArgsNoName arg = TwoArgsNoNameFactory.create(node1, node2);
Assert.assertEquals(node1, arg.getChild0());
Assert.assertEquals(node2, arg.getChild1());
Assert.assertEquals(84, TestHelper.createCallTarget(arg).call());
}
Aggregations