public class EvaluationTest extends Object
This runs a series of tests specifically for the evaluator. It parses and evaluates various expressions in the context of a test PageContext containing preset data, and prints out the results of the evaluations.
The expressions are stored in an input text file, where one line contains the expression and the next line contains the expected type. Blank lines and lines that start with # are ignored. The results are written to an output file (blank lines and # lines are included in the output file). The output file may be compared against an existing output file to do regression testing.
Constructor and Description |
---|
EvaluationTest()
Constructor
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isDifferentFiles(DataInput pIn1,
DataInput pIn2)
Performs a line-by-line comparison of the two files, returning
true if the files are different, false if not.
|
static boolean |
isDifferentFiles(File pFile1,
File pFile2)
Performs a line-by-line comparison of the two files, returning
true if the files are different, false if not.
|
static void |
main(String[] pArgs)
Runs the evaluation test
|
static void |
runTests(DataInput pIn,
PrintStream pOut)
Runs the tests, reading expressions from pIn and writing the
results to pOut.
|
static void |
runTests(File pInputFile,
File pOutputFile)
Runs the tests, reading from the given input file and writing to
the given output file.
|
public static void runTests(DataInput pIn, PrintStream pOut) throws IOException
IOException
public static void runTests(File pInputFile, File pOutputFile) throws IOException
IOException
public static boolean isDifferentFiles(DataInput pIn1, DataInput pIn2) throws IOException
IOException
public static boolean isDifferentFiles(File pFile1, File pFile2) throws IOException
IOException
public static void main(String[] pArgs) throws IOException
IOException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.