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