public class Utility
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
autopsy
autopsy = line number at which files differ
|
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
static void |
done()
done performs standard clean-up by closing files and
restoring standard out and standard err
|
static void |
init()
init initializes Utility -- should be called but often is not
|
static void |
redirectStdErr(java.lang.String outputFile)
redirects standard error to file with name outputFile
|
static void |
redirectStdOut(java.lang.String outputFile)
redirects standard output to file with name outputFile
|
static void |
validate(java.lang.String outputFile,
java.lang.String correctFile,
boolean sortedTest)
verify that two files, whose names are outputFile and correctFile, by optionally
sorting them, are identical; silent output means both files are identical
|
static void |
validate(java.lang.String outputFile,
java.lang.String correctFile,
boolean sortedTest,
java.lang.String[] eliminate)
verify that two files, whose names are outputFile and correctFile, by optionally
sorting them, and eliminating an array of regular expressions, are identical;
silent output means both files are identical
|
public static void init()
public static void redirectStdOut(java.lang.String outputFile)
outputFile
- -- name of file to which System.out is to be directedpublic static void redirectStdErr(java.lang.String outputFile)
outputFile
- -- name of file to which System.err is to be directedpublic static void done()
public static void validate(java.lang.String outputFile, java.lang.String correctFile, boolean sortedTest)
outputFile
- -- file that was producedcorrectFile
- -- file that is known to be correctsortedTest
- -- are files to be sorted prior to comparison?public static void validate(java.lang.String outputFile, java.lang.String correctFile, boolean sortedTest, java.lang.String[] eliminate)
outputFile
- -- file that was producedcorrectFile
- -- file that is known to be correctsortedTest
- -- are files to be sorted prior to comparison?eliminate
- -- array of regular expressions to remove from both files prior to comparing them