Package com.singularsys.jeptests.system
Class ExpressionEvalTest
java.lang.Object
com.singularsys.jeptests.system.ExpressionEvalTest
This class is designed for testing the validity of Jep evaluations.
Expressions from a text file are evaluated with Jep in pairs of two, and
the results are compared. If they do not match, the two expressions are
printed to standard output.
Take for example an input text file containing the two lines
1+2 3.The expressions '1+2' and '3' are evaluated with Jep and the results compared.
- Author:
- Nathan Funk
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
The main method checks the arguments and creates an instance and runs a testprotected static void
Helper function for printing lines.void
void
testFast()
void
testJepInstance
(Jep jep, BufferedReader reader) void
testJepInstance
(Jep jep, String fileName) Loads the file specified in fileName.void
void
void
-
Field Details
-
lineCount
protected int lineCountCurrent line position
-
-
Constructor Details
-
ExpressionEvalTest
public ExpressionEvalTest()Creates a new ExpressionEvalTest instance
-
-
Method Details
-
main
The main method checks the arguments and creates an instance and runs a test -
testStandard
- Throws:
Exception
-
testFast
- Throws:
Exception
-
testConfParser
- Throws:
Exception
-
testPostfixEvaluator
- Throws:
Exception
-
testReals
- Throws:
Exception
-
testJepInstance
Loads the file specified in fileName. Evaluates the expressions listed in it and compares the expressions with the results. -
testJepInstance
-
println
Helper function for printing lines.
-