public class ExpressionTest
extends java.lang.Object
implements java.lang.Runnable
ExpressionTest
class test a parser with a given set of
inputs and expected result.Constructor and Description |
---|
ExpressionTest(java.lang.String expression,
ExpressionParser parser,
java.lang.String[] names,
double[] values,
double result)
Creates a new expression test.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isCorrect()
Gets the result is correct flag.
|
ExpressionTest |
not()
Gets the opposite of this test.
|
void |
run() |
java.lang.String |
toString() |
public ExpressionTest(java.lang.String expression, ExpressionParser parser, java.lang.String[] names, double[] values, double result)
expression
- the expression to parse.parser
- the parser implementation to use for the expression.names
- the names of the variables available to the expression.values
- the values of the variables.result
- the expected result.public java.lang.String toString()
toString
in class java.lang.Object
public void run()
run
in interface java.lang.Runnable
public boolean isCorrect()
public ExpressionTest not()