Package com.singularsys.exttests
Class MRpeTest
- java.lang.Object
-
- com.singularsys.exttests.MRpeTest
-
public class MRpeTest extends java.lang.Object
JUnit test for full Matrix Rp evaluator
-
-
Constructor Summary
Constructors Constructor Description MRpeTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MrpRes
calcValue(java.lang.String expr)
void
cleanTest(java.lang.String expr, java.lang.String expected)
Parses and cleans both expressions, test toString on bothvoid
cleanTestString(java.lang.String expr, java.lang.String expected)
Parses and cleans expr, test equal to expected stringvoid
complexValueTest(java.lang.String expr, Complex expected, double tol)
void
convertToVector_fails_with_lightWeightInstance_Jep()
void
convertToVector_works_with_lightWeightInstance_Jep_with_matrix_factory()
void
duplicate_MrpVarRef_preserve_properties()
void
getLightweightInstance_Jep_copies_varrefs__properties_values()
Variable x = jep.addVariable("x"); dimV.setVariableDimensions(x, Dimensions.SCALER); MrpVarRef xref = mrpe.getVarRef(x); mrpe.setVarValue(xref, 5.0); ComponentSet cs = new LightWeightComponentSet(jep); XJep lwj = new XJep(cs); MrpEval neweval = (MrpEval) mrpe.getLightWeightInstance(lwj);
void
getLightweightInstance_null_copies_varvalues()
void
getVarRef_string_works_with_lightWeightInstance_Jep()
void
getVarRef_variable_works_with_lightWeightInstance_Jep()
void
instance_with_null_matrix_factory_fails_with_MatrixFunctions()
void
instance_with_null_matrix_factory_works()
void
myAssertEquals(java.lang.String msg, java.lang.String actual, java.lang.String expected)
void
normal_distribution()
void
set_matrix_variable_to_2Darray()
void
set_one_element_vector_to_vector()
void
set_scaler_variable_to_one_element_vector()
void
set_scaler_variable_to_scaler()
void
set_vector_variable_to_vector()
void
setting_one_element_vector_to_scaler_fails()
void
setUp()
void
test_compile_Variable_Node()
void
test_matrixFunctionI_with_lightWeightInstance_Jep()
void
test_toFlaternedArray()
void
testAssign()
void
testChangedDim()
void
testCMul_with_lightWeightInstance()
void
testEle()
void
testFocalSurface()
void
testFun()
void
testFunctionName()
void
testGood()
void
testHeaps()
void
testLogical()
void
testMatrixFunctions()
void
testMatrixFunctions_with_lightWeightInstance()
void
testMRpeEval()
Tests basic operation of the RpEval class.void
testMRpSurf()
void
testMul()
void
testResultType()
void
testRp()
void
testRpAllDim()
void
testRpSurf()
void
testSetEle()
void
testSetVar()
void
testUndecVar()
void
testUnsetDimension()
Using a non matrix compatible set of operators/functions.void
testVariableMatrix()
void
testVn()
protected void
valueTest(java.lang.String expr, MrpRes expected)
void
valueTest(java.lang.String expr, java.lang.String expected)
-
-
-
Method Detail
-
setUp
@BeforeEach public void setUp()
-
testMRpeEval
@Test public void testMRpeEval() throws java.lang.Exception
Tests basic operation of the RpEval class.- Throws:
java.lang.Exception
-
testRpSurf
@Test public void testRpSurf() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testFunctionName
@Test public void testFunctionName() throws java.lang.Exception
- Throws:
java.lang.Exception
-
instance_with_null_matrix_factory_works
@Test public void instance_with_null_matrix_factory_works() throws JepException
- Throws:
JepException
-
instance_with_null_matrix_factory_fails_with_MatrixFunctions
@Test public void instance_with_null_matrix_factory_fails_with_MatrixFunctions() throws JepException
- Throws:
JepException
-
test_compile_Variable_Node
@Test public void test_compile_Variable_Node()
-
testResultType
@Test public void testResultType() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testVariableMatrix
@Test public void testVariableMatrix() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGood
@Test public void testGood()
-
myAssertEquals
public void myAssertEquals(java.lang.String msg, java.lang.String actual, java.lang.String expected)
-
valueTest
protected void valueTest(java.lang.String expr, MrpRes expected) throws java.lang.Exception
- Throws:
java.lang.Exception
-
valueTest
public void valueTest(java.lang.String expr, java.lang.String expected) throws JepException
- Throws:
JepException
-
complexValueTest
public void complexValueTest(java.lang.String expr, Complex expected, double tol) throws java.lang.Exception
- Throws:
java.lang.Exception
-
calcValue
public MrpRes calcValue(java.lang.String expr) throws JepException
- Throws:
JepException
-
cleanTest
public void cleanTest(java.lang.String expr, java.lang.String expected) throws JepException
Parses and cleans both expressions, test toString on both- Parameters:
expr
-expected
-- Throws:
JepException
-
cleanTestString
public void cleanTestString(java.lang.String expr, java.lang.String expected) throws JepException
Parses and cleans expr, test equal to expected string- Parameters:
expr
-expected
-- Throws:
JepException
-
testRp
@Test public void testRp() throws JepException
- Throws:
JepException
-
testRpAllDim
@Test public void testRpAllDim() throws JepException
- Throws:
JepException
-
testMul
@Test public void testMul() throws JepException
- Throws:
JepException
-
testAssign
@Test public void testAssign() throws JepException
- Throws:
JepException
-
testSetEle
@Test public void testSetEle() throws JepException
- Throws:
JepException
-
testChangedDim
@Test public void testChangedDim() throws JepException
- Throws:
JepException
-
testLogical
@Test public void testLogical() throws JepException
- Throws:
JepException
-
testVn
@Test public void testVn() throws JepException
- Throws:
JepException
-
testHeaps
@Test public void testHeaps() throws JepException
- Throws:
JepException
-
testMatrixFunctions
@Test public void testMatrixFunctions() throws JepException
- Throws:
JepException
-
testEle
@Test public void testEle() throws JepException
- Throws:
JepException
-
testSetVar
@Test public void testSetVar() throws JepException
- Throws:
JepException
-
set_scaler_variable_to_scaler
@Test public void set_scaler_variable_to_scaler() throws JepException
- Throws:
JepException
-
set_scaler_variable_to_one_element_vector
@Test public void set_scaler_variable_to_one_element_vector() throws JepException
- Throws:
JepException
-
set_one_element_vector_to_vector
@Test public void set_one_element_vector_to_vector() throws JepException
- Throws:
JepException
-
setting_one_element_vector_to_scaler_fails
@Test public void setting_one_element_vector_to_scaler_fails() throws JepException
- Throws:
JepException
-
set_vector_variable_to_vector
@Test public void set_vector_variable_to_vector() throws JepException
- Throws:
JepException
-
set_matrix_variable_to_2Darray
@Test public void set_matrix_variable_to_2Darray() throws JepException
- Throws:
JepException
-
testFun
@Test public void testFun() throws JepException
- Throws:
JepException
-
testUndecVar
@Test public void testUndecVar() throws JepException
- Throws:
JepException
-
testMRpSurf
@Test public void testMRpSurf() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testFocalSurface
@Test public void testFocalSurface() throws JepException
- Throws:
JepException
-
testUnsetDimension
@Test public void testUnsetDimension() throws JepException
Using a non matrix compatible set of operators/functions.- Throws:
JepException
-
test_toFlaternedArray
@Test public void test_toFlaternedArray() throws JepException
- Throws:
JepException
-
duplicate_MrpVarRef_preserve_properties
@Test public void duplicate_MrpVarRef_preserve_properties() throws JepException
- Throws:
JepException
-
getLightweightInstance_null_copies_varvalues
@Test public void getLightweightInstance_null_copies_varvalues() throws JepException
- Throws:
JepException
-
getLightweightInstance_Jep_copies_varrefs__properties_values
@Test public void getLightweightInstance_Jep_copies_varrefs__properties_values() throws JepException
Variable x = jep.addVariable("x"); dimV.setVariableDimensions(x, Dimensions.SCALER); MrpVarRef xref = mrpe.getVarRef(x); mrpe.setVarValue(xref, 5.0); ComponentSet cs = new LightWeightComponentSet(jep); XJep lwj = new XJep(cs); MrpEval neweval = (MrpEval) mrpe.getLightWeightInstance(lwj);
- Throws:
JepException
-
normal_distribution
@Test public void normal_distribution() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testCMul_with_lightWeightInstance
@Test public void testCMul_with_lightWeightInstance() throws JepException
- Throws:
JepException
-
test_matrixFunctionI_with_lightWeightInstance_Jep
@Test public void test_matrixFunctionI_with_lightWeightInstance_Jep() throws JepException
- Throws:
JepException
-
getVarRef_string_works_with_lightWeightInstance_Jep
@Test public void getVarRef_string_works_with_lightWeightInstance_Jep() throws JepException
- Throws:
JepException
-
getVarRef_variable_works_with_lightWeightInstance_Jep
@Test public void getVarRef_variable_works_with_lightWeightInstance_Jep() throws JepException
- Throws:
JepException
-
convertToVector_fails_with_lightWeightInstance_Jep
@Test public void convertToVector_fails_with_lightWeightInstance_Jep() throws JepException
- Throws:
JepException
-
convertToVector_works_with_lightWeightInstance_Jep_with_matrix_factory
@Test public void convertToVector_works_with_lightWeightInstance_Jep_with_matrix_factory() throws JepException
- Throws:
JepException
-
testMatrixFunctions_with_lightWeightInstance
@Test public void testMatrixFunctions_with_lightWeightInstance() throws JepException
- Throws:
JepException
-
-