Class XJepTest

  • Direct Known Subclasses:
    DJepTest

    public class XJepTest
    extends JepTest
    Author:
    Rich Morris Created on 17-Apr-2005
    • Field Detail

      • xj

        protected XJep xj
    • Constructor Detail

      • XJepTest

        public XJepTest()
    • Method Detail

      • setUp

        public void setUp()
        Description copied from class: JepTest
        Sets up the parser.
        Overrides:
        setUp in class JepTest
      • testOperatorTable

        public void testOperatorTable()
      • testFunctionTable

        public void testFunctionTable()
        Checks it uses DirtyRandom
      • testFunctionTableWithExtraComponents

        public void testFunctionTableWithExtraComponents()
      • testXFunctionTable_with_decorator_counstructor

        public void testXFunctionTable_with_decorator_counstructor()
      • processCleanTestString

        public void processCleanTestString​(java.lang.String expr,
                                           java.lang.String expected)
                                    throws JepException
        Parse, process, cleans expr test equal to expected
        Parameters:
        expr -
        expected -
        Throws:
        JepException
      • cleanerTest

        public void cleanerTest​(java.lang.String expr,
                                java.lang.String expected)
                         throws JepException
        parses, processes and cleans both expression, tests toString are equals
        Parameters:
        expr -
        expected -
        Throws:
        JepException
      • parseProcCleanEval

        public Node parseProcCleanEval​(java.lang.String expr,
                                       java.lang.Object expected)
                                throws ParseException,
                                       java.lang.Exception
        Parse, process, clean and evaluated tests equal to expected
        Parameters:
        expr -
        expected -
        Returns:
        Throws:
        ParseException
        java.lang.Exception
      • testLogical

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

        public void testVariableReuse()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testFormat

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

        public void testVarInEqn()
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testTreeBuild

        public void testTreeBuild()
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testSub

        public void testSub()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testNull

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

        public void testBad()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • preprocess_function_cause_argument_to_be_preprocessed_at_eval_time

        public void preprocess_function_cause_argument_to_be_preprocessed_at_eval_time()
                                                                                throws JepException
        Throws:
        JepException
      • eval_function_cause_argument_to_be_evaluated_at_preprocessed_time

        public void eval_function_cause_argument_to_be_evaluated_at_preprocessed_time()
                                                                               throws JepException
        Throws:
        JepException
      • build_expression_step_by_step_using_preprocess_eval_and_eqn

        public void build_expression_step_by_step_using_preprocess_eval_and_eqn()
                                                                         throws JepException
        Throws:
        JepException
      • testSetupPreprocess_functions_using_xjep_constructor

        public void testSetupPreprocess_functions_using_xjep_constructor()
                                                                  throws JepException
        Throws:
        JepException
      • testSetupPreprocess_functions_using_default_constructor

        public void testSetupPreprocess_functions_using_default_constructor()
                                                                     throws JepException
        Throws:
        JepException
      • shallowcopy_of_preprocess_functions_are_new_instances_of_same_classes

        public void shallowcopy_of_preprocess_functions_are_new_instances_of_same_classes()
                                                                                   throws JepException
        Throws:
        JepException
      • test_substitution_with_xvariable

        public void test_substitution_with_xvariable()
                                              throws JepException
        Throws:
        JepException
      • test_xassign_with_preprocessor

        public void test_xassign_with_preprocessor()
                                            throws JepException
        Three different cases:
        • XAssign with use equation == false, do nothing
        • use equation == true, var on lhs, set vars equation
        • use equation == true, LValueI on lhs do nothing
        • use equation == true, SymbolicLValueI on lhs, call setEqn()
        check preprocessing work
        Throws:
        JepException