Package com.singularsys.exttests
Class RpTest
- java.lang.Object
-
- com.singularsys.jeptests.system.JepTest
-
- com.singularsys.exttests.RpTest
-
public class RpTest extends JepTest
Tests the fastreal evaluator. @link{#testRpEval()} tests using the faster RpEval.evaluate method. Most other tests use the RpEvaluator which uses the jep evaluation framework and override tests from JepTest.- Author:
- Richard Morris
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RpTest.MyArcSin
-
Nested classes/interfaces inherited from class com.singularsys.jeptests.system.JepTest
JepTest.AddFractionsNary, JepTest.AddFractionsStack, JepTest.Diff, JepTest.MyBinary, JepTest.MyNary, JepTest.MyNaryBinary, JepTest.MyNullary, JepTest.MyUnary, JepTest.PiFun, JepTest.Product, JepTest.Square
-
-
Field Summary
-
Fields inherited from class com.singularsys.jeptests.system.JepTest
jep, myFalse, myTrue, PRINT_RESULTS
-
-
Constructor Summary
Constructors Constructor Description RpTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
Sets up the parser.void
test_customFun_lightWeightInstance()
void
test_customFun_lightWeightInstance_jep()
void
test_lightWeightInstance()
void
test_lightWeightInstance_Jep()
void
test_renamed_functions()
Checks if a function renamed in jep works with ReEval instances.void
testCaseNull()
void
testCaseString()
void
testChangeName()
void
testChangeVariableComplex()
Test changing variables value after parsingvoid
testComplex()
void
testComplexListAccess()
void
testEvaluateComplex()
void
testEvaluateString()
void
testLazyLogical()
void
testLazyLogical2()
void
testLazyLogicalBug()
Test for bug with 1&&1&&1void
testListAccess()
void
testListAccessShiftZero()
void
testListExtra()
void
testListFunctions()
void
testMultiDimArray()
void
testMultiDimArrayShiftZero()
void
testNull()
void
testRecursiveMacroFunction()
void
testRpEval()
Tests basic operation of the RpEval class.void
testRpSurf()
void
testSetAllowUndeclared()
Tests whether allowUndeclared is working properly.void
testSpecialFunctions()
void
testStrings()
void
testStringsFun()
void
testSwitch()
protected void
valueTest(java.lang.String expr, java.lang.Object expected)
Test result j.evaluate(j.parse(expr))-
Methods inherited from class com.singularsys.jeptests.system.JepTest
assertEqNodes, buildMatrix, buildVector, calcValue, calcValue, checkVector, compareRecursive, complexValueTest, myAssertEquals, myAssertNaN, myAssertNull, negativeZero, nodeTest, nodeTest, nodeTest, nodeTest, printTestHeader, setShiftZeroElePfmc, test_not_X_Y, testAssign, testBinom, testBlankParser, testChangeVariable, testComments, testEleUnit, testEmptyEqn, testEmptyEqn2, testEvalExceptions, testEvaluate, testExpectedTokenSequence, testFormat, testFunction, testIf, testImplicitMul, testLogarithm, testLogical, testMacroFunction, testMultiLine, testMultiplyBug, testNaN, testNoAssign, testNumberAsBooleanLogical, testNumbers, testNumParam, testParseException, testPlusPlus, testSemiColon, testSimpleSum, testSpecialFunctions, testUminusPower, testX2Y, valueTest, valueTestFail, valueTestNaN, valueTestNull, valueTestString
-
-
-
-
Method Detail
-
setUp
public void setUp()
Description copied from class:JepTest
Sets up the parser.
-
valueTest
protected void valueTest(java.lang.String expr, java.lang.Object expected) throws java.lang.Exception
Description copied from class:JepTest
Test result j.evaluate(j.parse(expr))
-
testRpEval
public void testRpEval() throws java.lang.Exception
Tests basic operation of the RpEval class.- Throws:
java.lang.Exception
-
testRpSurf
public void testRpSurf() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSetAllowUndeclared
public void testSetAllowUndeclared() throws java.lang.Exception
Description copied from class:JepTest
Tests whether allowUndeclared is working properly.- Overrides:
testSetAllowUndeclared
in classJepTest
- Throws:
java.lang.Exception
-
testChangeName
public void testChangeName() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testEvaluateComplex
public void testEvaluateComplex() throws java.lang.Exception
- Overrides:
testEvaluateComplex
in classJepTest
- Throws:
java.lang.Exception
-
testEvaluateString
public void testEvaluateString() throws java.lang.Exception
- Overrides:
testEvaluateString
in classJepTest
- Throws:
java.lang.Exception
-
testChangeVariableComplex
public void testChangeVariableComplex() throws java.lang.Exception
Description copied from class:JepTest
Test changing variables value after parsing- Overrides:
testChangeVariableComplex
in classJepTest
- Throws:
java.lang.Exception
-
testStrings
public void testStrings() throws java.lang.Exception
- Overrides:
testStrings
in classJepTest
- Throws:
java.lang.Exception
-
testComplex
public void testComplex() throws java.lang.Exception
- Overrides:
testComplex
in classJepTest
- Throws:
java.lang.Exception
-
testListAccess
public void testListAccess() throws java.lang.Exception
- Overrides:
testListAccess
in classJepTest
- Throws:
java.lang.Exception
-
testComplexListAccess
public void testComplexListAccess() throws java.lang.Exception
- Overrides:
testComplexListAccess
in classJepTest
- Throws:
java.lang.Exception
-
testListAccessShiftZero
public void testListAccessShiftZero() throws java.lang.Exception
- Overrides:
testListAccessShiftZero
in classJepTest
- Throws:
java.lang.Exception
-
testListExtra
public void testListExtra() throws java.lang.Exception
- Overrides:
testListExtra
in classJepTest
- Throws:
java.lang.Exception
-
testListFunctions
public void testListFunctions() throws java.lang.Exception
- Overrides:
testListFunctions
in classJepTest
- Throws:
java.lang.Exception
-
testMultiDimArray
public void testMultiDimArray() throws java.lang.Exception
- Overrides:
testMultiDimArray
in classJepTest
- Throws:
java.lang.Exception
-
testMultiDimArrayShiftZero
public void testMultiDimArrayShiftZero() throws java.lang.Exception
- Overrides:
testMultiDimArrayShiftZero
in classJepTest
- Throws:
java.lang.Exception
-
testLazyLogicalBug
public void testLazyLogicalBug() throws java.lang.Exception
Description copied from class:JepTest
Test for bug with 1&&1&&1- Overrides:
testLazyLogicalBug
in classJepTest
- Throws:
java.lang.Exception
-
testLazyLogical
public void testLazyLogical() throws java.lang.Exception
- Overrides:
testLazyLogical
in classJepTest
- Throws:
java.lang.Exception
-
testLazyLogical2
public void testLazyLogical2() throws java.lang.Exception
- Overrides:
testLazyLogical2
in classJepTest
- Throws:
java.lang.Exception
-
testRecursiveMacroFunction
public void testRecursiveMacroFunction() throws java.lang.Exception
- Overrides:
testRecursiveMacroFunction
in classJepTest
- Throws:
java.lang.Exception
-
testCaseString
public void testCaseString() throws java.lang.Exception
- Overrides:
testCaseString
in classJepTest
- Throws:
java.lang.Exception
-
testSwitch
public void testSwitch() throws java.lang.Exception
- Overrides:
testSwitch
in classJepTest
- Throws:
java.lang.Exception
-
testCaseNull
public void testCaseNull() throws java.lang.Exception
- Overrides:
testCaseNull
in classJepTest
- Throws:
java.lang.Exception
-
testNull
public void testNull() throws java.lang.Exception
-
testStringsFun
public void testStringsFun() throws java.lang.Exception
- Overrides:
testStringsFun
in classJepTest
- Throws:
java.lang.Exception
-
testSpecialFunctions
public void testSpecialFunctions() throws java.lang.Exception
- Overrides:
testSpecialFunctions
in classJepTest
- Throws:
java.lang.Exception
-
test_lightWeightInstance
public void test_lightWeightInstance() throws JepException
- Throws:
JepException
-
test_lightWeightInstance_Jep
public void test_lightWeightInstance_Jep() throws JepException
- Throws:
JepException
-
test_customFun_lightWeightInstance
public void test_customFun_lightWeightInstance() throws JepException
- Throws:
JepException
-
test_customFun_lightWeightInstance_jep
public void test_customFun_lightWeightInstance_jep() throws JepException
- Throws:
JepException
-
test_renamed_functions
public void test_renamed_functions() throws JepException
Checks if a function renamed in jep works with ReEval instances.- Throws:
ParseException
JepException
-
-