Package com.singularsys.exttests.matrix
Class MRpeMatrixTest
- java.lang.Object
-
- com.singularsys.jeptests.system.JepTest
-
- com.singularsys.jeptests.system.CPTest
-
- com.singularsys.exttests.matrix.MatrixTest
-
- com.singularsys.exttests.matrix.MRpeMatrixTest
-
public class MRpeMatrixTest extends MatrixTest
Tests the fastmatrix 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/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.exttests.matrix.MatrixTest
dimv, mfact, mfield
-
Fields inherited from class com.singularsys.jeptests.system.JepTest
jep, myFalse, myTrue, PRINT_RESULTS
-
-
Constructor Summary
Constructors Constructor Description MRpeMatrixTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
calcValue(Node node)
Calculate the value of an expression.protected void
myAssertEquals(java.lang.String msg, java.lang.Object expected, java.lang.Object actual)
protected java.lang.Object
negativeZero()
protected void
setShiftZeroElePfmc()
void
setUp()
Sets up the parser.void
testCaseNull()
void
testCaseString()
void
testChangeDim()
void
testChangeVariableComplex()
Test changing variables value after parsingvoid
testComplex()
void
testComplexListAccess()
void
testCPStrings()
void
testDepth3ArrayAccess()
Null implementation as does not support arrays of matricesvoid
testDepth3ArrayAccessShiftZero()
void
testEvaluateComplex()
void
testEvaluateString()
void
testLazyLogical()
void
testLazyLogical2()
void
testLazyLogicalBug()
Test for bug with 1&&1&&1void
testNull()
void
testRecursiveMacroFunction()
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))protected void
valueTestString(java.lang.String expr, java.lang.String expected)
-
Methods inherited from class com.singularsys.exttests.matrix.MatrixTest
buildMatrix, buildVector, checkVector, testAdd, testDet, testDiv, testEleUnit, testEleUnitShiftZero, testEq, testId, testListFunctions, testMatrixArrayAccess, testMatrixSetElement, testMod, testMul, testMultiDimArrayPrint, testNeg, testNeq, testSimpleVector, testSize, testSub, testTrace, testTrans
-
Methods inherited from class com.singularsys.jeptests.system.CPTest
testAddOp, testEmptyEqn2, testMultiDimArrayAccess, testMultiDimArrayAccessShiftZero
-
Methods inherited from class com.singularsys.jeptests.system.JepTest
assertEqNodes, calcValue, compareRecursive, complexValueTest, myAssertNaN, myAssertNull, nodeTest, nodeTest, nodeTest, nodeTest, printTestHeader, test_not_X_Y, testAssign, testBinom, testBlankParser, testChangeVariable, testComments, testEmptyEqn, testEvalExceptions, testEvaluate, testExpectedTokenSequence, testFormat, testFunction, testIf, testImplicitMul, testListAccess, testListAccessShiftZero, testListExtra, testLogarithm, testLogical, testMacroFunction, testMultiDimArray, testMultiDimArrayShiftZero, testMultiLine, testMultiplyBug, testNaN, testNoAssign, testNumberAsBooleanLogical, testNumbers, testNumParam, testParseException, testPlusPlus, testSemiColon, testSimpleSum, testSpecialFunctions, testUminusPower, testX2Y, valueTest, valueTestFail, valueTestNaN, valueTestNull
-
-
-
-
Method Detail
-
setUp
public void setUp()
Description copied from class:JepTest
Sets up the parser.- Overrides:
setUp
in classMatrixTest
-
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))- Overrides:
valueTest
in classMatrixTest
- Parameters:
expr
- the expression to parse and evaluateexpected
- result expected- Throws:
java.lang.Exception
-
valueTestString
protected void valueTestString(java.lang.String expr, java.lang.String expected) throws java.lang.Exception
- Overrides:
valueTestString
in classMatrixTest
- Throws:
java.lang.Exception
-
myAssertEquals
protected void myAssertEquals(java.lang.String msg, java.lang.Object expected, java.lang.Object actual) throws EvaluationException
- Overrides:
myAssertEquals
in classMatrixTest
- Throws:
EvaluationException
-
setShiftZeroElePfmc
protected void setShiftZeroElePfmc()
- Overrides:
setShiftZeroElePfmc
in classMatrixTest
-
calcValue
protected java.lang.Object calcValue(Node node) throws java.lang.Exception
Description copied from class:JepTest
Calculate the value of an expression.
-
negativeZero
protected java.lang.Object negativeZero()
- Overrides:
negativeZero
in classJepTest
-
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
-
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
-
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
-
testNull
public void testNull() throws java.lang.Exception
-
testCaseNull
public void testCaseNull() throws java.lang.Exception
- Overrides:
testCaseNull
in classJepTest
- Throws:
java.lang.Exception
-
testStringsFun
public void testStringsFun() throws java.lang.Exception
- Overrides:
testStringsFun
in classJepTest
- Throws:
java.lang.Exception
-
testComplexListAccess
public void testComplexListAccess() throws java.lang.Exception
- Overrides:
testComplexListAccess
in classJepTest
- Throws:
java.lang.Exception
-
testSwitch
public void testSwitch() throws java.lang.Exception
- Overrides:
testSwitch
in classJepTest
- Throws:
java.lang.Exception
-
testDepth3ArrayAccess
public void testDepth3ArrayAccess() throws java.lang.Exception
Description copied from class:MatrixTest
Null implementation as does not support arrays of matrices- Overrides:
testDepth3ArrayAccess
in classMatrixTest
- Throws:
java.lang.Exception
-
testDepth3ArrayAccessShiftZero
public void testDepth3ArrayAccessShiftZero() throws java.lang.Exception
- Overrides:
testDepth3ArrayAccessShiftZero
in classMatrixTest
- Throws:
java.lang.Exception
-
testCPStrings
public void testCPStrings() throws java.lang.Exception
- Overrides:
testCPStrings
in classCPTest
- Throws:
java.lang.Exception
-
testChangeDim
public void testChangeDim() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSpecialFunctions
public void testSpecialFunctions() throws java.lang.Exception
- Overrides:
testSpecialFunctions
in classJepTest
- Throws:
java.lang.Exception
-
-