Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ChildNodeTest.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. |
76 | 76 |
77 @Child private TestChildNode left; | 77 @Child private TestChildNode left; |
78 @Child private TestChildNode right; | 78 @Child private TestChildNode right; |
79 | 79 |
80 public TestRootNode(TestChildNode left, TestChildNode right) { | 80 public TestRootNode(TestChildNode left, TestChildNode right) { |
81 super(null); | |
81 this.left = adoptChild(left); | 82 this.left = adoptChild(left); |
82 this.right = adoptChild(right); | 83 this.right = adoptChild(right); |
83 } | 84 } |
84 | 85 |
85 @Override | 86 @Override |
88 } | 89 } |
89 } | 90 } |
90 | 91 |
91 class TestChildNode extends Node { | 92 class TestChildNode extends Node { |
92 | 93 |
94 public TestChildNode() { | |
95 super(null); | |
96 } | |
97 | |
93 public int execute() { | 98 public int execute() { |
94 return 21; | 99 return 21; |
95 } | 100 } |
96 } | 101 } |
97 } | 102 } |