use of com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode in project graal by oracle.
the class CachedTest method testChildrenAdoption7.
@Test
public void testChildrenAdoption7() {
ChildrenAdoption7 root = createNode(ChildrenAdoption7Factory.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 CachedTest method testChildrenAdoption4.
@Test
public void testChildrenAdoption4() {
ChildrenAdoption4 root = createNode(ChildrenAdoption4Factory.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 testThreeArg.
@Test
public void testThreeArg() {
ValueNode node1 = new ConstantNode();
ValueNode node2 = new ConstantNode();
ValueNode node3 = new ConstantNode();
ThreeArgsNoName arg = ThreeArgsNoNameFactory.create(node1, node2, node3);
Assert.assertEquals(node1, arg.getChild0());
Assert.assertEquals(node2, arg.getChild1());
Assert.assertEquals(node3, arg.getChild2());
Assert.assertEquals(126, TestHelper.createCallTarget(arg).call());
}
use of com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode in project graal by oracle.
the class NodeChildNoNameTest method testOneArg.
@Test
public void testOneArg() {
ValueNode node = new ConstantNode();
OneArgNoName arg = OneArgNoNameFactory.create(node);
Assert.assertEquals(node, arg.getChild0());
Assert.assertEquals(43, TestHelper.createCallTarget(arg).call());
}
use of com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode in project graal by oracle.
the class CachedTest method testChildrenAdoption5.
@Test
public void testChildrenAdoption5() {
ChildrenAdoption5 root = createNode(ChildrenAdoption5Factory.getInstance(), false);
Node child = new ValueNode();
root.execute(child);
Assert.assertTrue(hasParent(root, child));
}
Aggregations