copyright notices/updates
[sbp.git] / src / edu / berkeley / sbp / misc / RegressionTests.java
index d2443ad..33c015d 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
+
 package edu.berkeley.sbp.misc;
 import java.io.*;
 import java.util.*;
@@ -202,13 +204,13 @@ public class RegressionTests {
                 else if ("input".equals(tree.head())) return string(tree.children());
                 else if ("testcase".equals(tree.head())) {
                     String input = string(tree.child(0));
-                    String[] output = tree.numChildren()>2 ? ((String[])walk(tree, 1)) : new String[0];
-                    Union grammar = Grammar.create(tree.child(tree.numChildren()-1), "s", new MetaGrammarBindings());
+                    String[] output = tree.size()>2 ? ((String[])walk(tree, 1)) : new String[0];
+                    Union grammar = Grammar.create(tree.child(tree.size()-1), "s", new MetaGrammarBindings());
                     TestCase tc = new TestCase(input, output, grammar, false, false);
                     return tc;
                 } else if ("ts".equals(tree.head())) return walk(tree, 0);
                 else if (tree.head() == null) {
-                    Object[] ret = new Object[tree.numChildren()];
+                    Object[] ret = new Object[tree.size()];
                     for(int i=0; i<ret.length; i++)
                         ret[i] = walk(tree.child(i));
                     return Reflection.lub(ret);