com.sun.labs.minion.test.regression
Class TestUtils

java.lang.Object
  extended by com.sun.labs.minion.test.regression.TestUtils

public class TestUtils
extends java.lang.Object

Utility methods for the regression test package.


Constructor Summary
TestUtils()
           
 
Method Summary
static void permutations(int k, java.util.List entryList, java.lang.String file)
          Writes to the given file all possible permutations of k entrys from the given list of entrys.
static void writeEntries(Entry[] entryArray, java.io.Writer writer)
          Prints the given array of entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestUtils

public TestUtils()
Method Detail

permutations

public static void permutations(int k,
                                java.util.List entryList,
                                java.lang.String file)
                         throws java.io.IOException
Writes to the given file all possible permutations of k entrys from the given list of entrys. For example, if k is 3, then a list containing all the possible permutations of 3 entrys will be returned.

Parameters:
k - the size of the resulting permutation
entryList - the list of entrys to choose from
file - the file to write to
Throws:
java.io.IOException

writeEntries

public static void writeEntries(Entry[] entryArray,
                                java.io.Writer writer)
                         throws java.io.IOException
Prints the given array of entries.

Parameters:
entryArray - the array of entries to print
Throws:
java.io.IOException