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.ObjectcalcValue(Node node)Calculate the value of an expression.protected voidmyAssertEquals(java.lang.String msg, java.lang.Object expected, java.lang.Object actual)protected java.lang.ObjectnegativeZero()protected voidsetShiftZeroElePfmc()voidsetUp()Sets up the parser.voidtestCaseNull()voidtestCaseString()voidtestChangeDim()voidtestChangeVariableComplex()Test changing variables value after parsingvoidtestComplex()voidtestComplexListAccess()voidtestCPStrings()voidtestDepth3ArrayAccess()Null implementation as does not support arrays of matricesvoidtestDepth3ArrayAccessShiftZero()voidtestEvaluateComplex()voidtestEvaluateString()voidtestLazyLogical()voidtestLazyLogical2()voidtestLazyLogicalBug()Test for bug with 1&&1&&1voidtestNull()voidtestRecursiveMacroFunction()voidtestSetAllowUndeclared()Tests whether allowUndeclared is working properly.voidtestSpecialFunctions()voidtestStrings()voidtestStringsFun()voidtestSwitch()protected voidvalueTest(java.lang.String expr, java.lang.Object expected)Test result j.evaluate(j.parse(expr))protected voidvalueTestString(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:JepTestSets up the parser.- Overrides:
setUpin classMatrixTest
-
valueTest
protected void valueTest(java.lang.String expr, java.lang.Object expected) throws java.lang.ExceptionDescription copied from class:JepTestTest result j.evaluate(j.parse(expr))- Overrides:
valueTestin 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:
valueTestStringin classMatrixTest- Throws:
java.lang.Exception
-
myAssertEquals
protected void myAssertEquals(java.lang.String msg, java.lang.Object expected, java.lang.Object actual) throws EvaluationException- Overrides:
myAssertEqualsin classMatrixTest- Throws:
EvaluationException
-
setShiftZeroElePfmc
protected void setShiftZeroElePfmc()
- Overrides:
setShiftZeroElePfmcin classMatrixTest
-
calcValue
protected java.lang.Object calcValue(Node node) throws java.lang.Exception
Description copied from class:JepTestCalculate the value of an expression.
-
negativeZero
protected java.lang.Object negativeZero()
- Overrides:
negativeZeroin classJepTest
-
testSetAllowUndeclared
public void testSetAllowUndeclared() throws java.lang.ExceptionDescription copied from class:JepTestTests whether allowUndeclared is working properly.- Overrides:
testSetAllowUndeclaredin classJepTest- Throws:
java.lang.Exception
-
testEvaluateComplex
public void testEvaluateComplex() throws java.lang.Exception- Overrides:
testEvaluateComplexin classJepTest- Throws:
java.lang.Exception
-
testEvaluateString
public void testEvaluateString() throws java.lang.Exception- Overrides:
testEvaluateStringin classJepTest- Throws:
java.lang.Exception
-
testChangeVariableComplex
public void testChangeVariableComplex() throws java.lang.ExceptionDescription copied from class:JepTestTest changing variables value after parsing- Overrides:
testChangeVariableComplexin classJepTest- Throws:
java.lang.Exception
-
testStrings
public void testStrings() throws java.lang.Exception- Overrides:
testStringsin classJepTest- Throws:
java.lang.Exception
-
testComplex
public void testComplex() throws java.lang.Exception- Overrides:
testComplexin classJepTest- Throws:
java.lang.Exception
-
testLazyLogicalBug
public void testLazyLogicalBug() throws java.lang.ExceptionDescription copied from class:JepTestTest for bug with 1&&1&&1- Overrides:
testLazyLogicalBugin classJepTest- Throws:
java.lang.Exception
-
testLazyLogical
public void testLazyLogical() throws java.lang.Exception- Overrides:
testLazyLogicalin classJepTest- Throws:
java.lang.Exception
-
testLazyLogical2
public void testLazyLogical2() throws java.lang.Exception- Overrides:
testLazyLogical2in classJepTest- Throws:
java.lang.Exception
-
testRecursiveMacroFunction
public void testRecursiveMacroFunction() throws java.lang.Exception- Overrides:
testRecursiveMacroFunctionin classJepTest- Throws:
java.lang.Exception
-
testCaseString
public void testCaseString() throws java.lang.Exception- Overrides:
testCaseStringin classJepTest- Throws:
java.lang.Exception
-
testNull
public void testNull() throws java.lang.Exception
-
testCaseNull
public void testCaseNull() throws java.lang.Exception- Overrides:
testCaseNullin classJepTest- Throws:
java.lang.Exception
-
testStringsFun
public void testStringsFun() throws java.lang.Exception- Overrides:
testStringsFunin classJepTest- Throws:
java.lang.Exception
-
testComplexListAccess
public void testComplexListAccess() throws java.lang.Exception- Overrides:
testComplexListAccessin classJepTest- Throws:
java.lang.Exception
-
testSwitch
public void testSwitch() throws java.lang.Exception- Overrides:
testSwitchin classJepTest- Throws:
java.lang.Exception
-
testDepth3ArrayAccess
public void testDepth3ArrayAccess() throws java.lang.ExceptionDescription copied from class:MatrixTestNull implementation as does not support arrays of matrices- Overrides:
testDepth3ArrayAccessin classMatrixTest- Throws:
java.lang.Exception
-
testDepth3ArrayAccessShiftZero
public void testDepth3ArrayAccessShiftZero() throws java.lang.Exception- Overrides:
testDepth3ArrayAccessShiftZeroin classMatrixTest- Throws:
java.lang.Exception
-
testCPStrings
public void testCPStrings() throws java.lang.Exception- Overrides:
testCPStringsin 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:
testSpecialFunctionsin classJepTest- Throws:
java.lang.Exception
-
-