comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ChildrenNodesTest.java @ 11903:df1d665ca846

Truffle; remove uses of Node() constructor in test code
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Sun, 06 Oct 2013 19:53:00 -0700
parents 5e3d1a68664e
children a08b8694f556
comparison
equal deleted inserted replaced
11901:61767ccd4600 11903:df1d665ca846
1 /* 1 /*
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2012, 2013, 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.
69 class TestRootNode extends RootNode { 69 class TestRootNode extends RootNode {
70 70
71 @Children private final TestChildNode[] children; 71 @Children private final TestChildNode[] children;
72 72
73 public TestRootNode(TestChildNode[] children) { 73 public TestRootNode(TestChildNode[] children) {
74 super(null);
74 this.children = adoptChildren(children); 75 this.children = adoptChildren(children);
75 } 76 }
76 77
77 @Override 78 @Override
78 public Object execute(VirtualFrame frame) { 79 public Object execute(VirtualFrame frame) {
84 } 85 }
85 } 86 }
86 87
87 class TestChildNode extends Node { 88 class TestChildNode extends Node {
88 89
90 public TestChildNode() {
91 super(null);
92 }
93
89 public int execute() { 94 public int execute() {
90 return 21; 95 return 21;
91 } 96 }
92 } 97 }
93 } 98 }