Class 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
    • Constructor Detail

      • MRpeMatrixTest

        public MRpeMatrixTest()
    • Method Detail

      • setUp

        public void setUp()
        Description copied from class: JepTest
        Sets up the parser.
        Overrides:
        setUp in class MatrixTest
      • 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 class MatrixTest
        Parameters:
        expr - the expression to parse and evaluate
        expected - 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 class MatrixTest
        Throws:
        java.lang.Exception
      • calcValue

        protected java.lang.Object calcValue​(Node node)
                                      throws java.lang.Exception
        Description copied from class: JepTest
        Calculate the value of an expression.
        Overrides:
        calcValue in class JepTest
        Throws:
        java.lang.Exception
      • negativeZero

        protected java.lang.Object negativeZero()
        Overrides:
        negativeZero in class JepTest
      • testSetAllowUndeclared

        public void testSetAllowUndeclared()
                                    throws java.lang.Exception
        Description copied from class: JepTest
        Tests whether allowUndeclared is working properly.
        Overrides:
        testSetAllowUndeclared in class JepTest
        Throws:
        java.lang.Exception
      • testEvaluateComplex

        public void testEvaluateComplex()
                                 throws java.lang.Exception
        Overrides:
        testEvaluateComplex in class JepTest
        Throws:
        java.lang.Exception
      • testEvaluateString

        public void testEvaluateString()
                                throws java.lang.Exception
        Overrides:
        testEvaluateString in class JepTest
        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 class JepTest
        Throws:
        java.lang.Exception
      • testStrings

        public void testStrings()
                         throws java.lang.Exception
        Overrides:
        testStrings in class JepTest
        Throws:
        java.lang.Exception
      • testComplex

        public void testComplex()
                         throws java.lang.Exception
        Overrides:
        testComplex in class JepTest
        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 class JepTest
        Throws:
        java.lang.Exception
      • testLazyLogical

        public void testLazyLogical()
                             throws java.lang.Exception
        Overrides:
        testLazyLogical in class JepTest
        Throws:
        java.lang.Exception
      • testLazyLogical2

        public void testLazyLogical2()
                              throws java.lang.Exception
        Overrides:
        testLazyLogical2 in class JepTest
        Throws:
        java.lang.Exception
      • testRecursiveMacroFunction

        public void testRecursiveMacroFunction()
                                        throws java.lang.Exception
        Overrides:
        testRecursiveMacroFunction in class JepTest
        Throws:
        java.lang.Exception
      • testCaseString

        public void testCaseString()
                            throws java.lang.Exception
        Overrides:
        testCaseString in class JepTest
        Throws:
        java.lang.Exception
      • testNull

        public void testNull()
                      throws java.lang.Exception
        Overrides:
        testNull in class JepTest
        Throws:
        java.lang.Exception
      • testCaseNull

        public void testCaseNull()
                          throws java.lang.Exception
        Overrides:
        testCaseNull in class JepTest
        Throws:
        java.lang.Exception
      • testStringsFun

        public void testStringsFun()
                            throws java.lang.Exception
        Overrides:
        testStringsFun in class JepTest
        Throws:
        java.lang.Exception
      • testComplexListAccess

        public void testComplexListAccess()
                                   throws java.lang.Exception
        Overrides:
        testComplexListAccess in class JepTest
        Throws:
        java.lang.Exception
      • testSwitch

        public void testSwitch()
                        throws java.lang.Exception
        Overrides:
        testSwitch in class JepTest
        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 class MatrixTest
        Throws:
        java.lang.Exception
      • testCPStrings

        public void testCPStrings()
                           throws java.lang.Exception
        Overrides:
        testCPStrings in class CPTest
        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 class JepTest
        Throws:
        java.lang.Exception