Class DictionaryTests
java.lang.Object
com.singularsys.jeptests.unit.misc.dictionary.DictionaryTests
- Direct Known Subclasses:
DictionaryTestsWithNull,DictionaryWithListNoNullTest
Abstract base class for test for the
com.singularsys.jep.misc.dictionary package.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a key value pair -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckOrMake(String name) Check if the function should exists, or not.booleanTest if a element is equal to a double.getJep()getKeyValue(Object ele) Convert and element to key-value pair.protected ObjectgetNumber(double d) Convert a double value to the number type used by this implementation.voidmyAssertEquals(double expected, Object actual) Asserts if the two values are equal, possible converting the double.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidtestGet()voidvoidtestkeys()voidprotected voidtestListOrMapSize(Object val, int n) voidvoidvoidvoidvoidvoidtestPut()voidvoidtestSize()voidvoid
-
Field Details
-
PRINT_RESULTS
public static final boolean PRINT_RESULTS -
jep
-
listOrMapOp
-
entryOp
-
nullValue
-
-
Constructor Details
-
DictionaryTests
public DictionaryTests()
-
-
Method Details
-
getJep
-
equals
Test if a element is equal to a double. Default is simplyele.equals(d).- Parameters:
ele- element to testd- number may be converted- Returns:
- true if equals after conversion
- Throws:
EvaluationException
-
myAssertEquals
Asserts if the two values are equal, possible converting the double. Default is simple assertEquals(expected,actual)- Parameters:
expected- expected number, may be convertedactual- value to test, un-converted
-
getNumber
Convert a double value to the number type used by this implementation. Default simple retuurnsd.- Parameters:
d- number- Returns:
- object representing the number
-
getKeyValue
Convert and element to key-value pair.- Parameters:
ele- representing a key-value pair- Returns:
- the pair
- Throws:
EvaluationException
-
testParseEmpty
- Throws:
JepException
-
testEvaluateEmpty
- Throws:
JepException
-
testParseSingle
- Throws:
JepException
-
testEvaluateSingle
- Throws:
JepException
-
testParseSingleNoVal
- Throws:
JepException
-
testParseDouble
- Throws:
JepException
-
testEvaluateDouble
- Throws:
JepException
-
testPrintDouble
- Throws:
JepException
-
testGetOr
- Throws:
JepException
-
testGet
- Throws:
JepException
-
testContainsKey
- Throws:
JepException
-
testPut
- Throws:
JepException
-
testListOrMapSize
-
testRemove
- Throws:
JepException
-
testClear
- Throws:
JepException
-
testkeys
- Throws:
JepException
-
testValues
- Throws:
JepException
-
testSize
- Throws:
JepException
-
testEntries
- Throws:
JepException
-
testEntriesIter
- Throws:
JepException
-
testKeysIter
- Throws:
JepException
-
checkOrMake
Check if the function should exists, or not. If it does not make the function- Parameters:
name- function name
-
testValuesIter
- Throws:
JepException
-
testAllFunctionsHaveDescriptions
@Tag("function_descriptions") @Test public void testAllFunctionsHaveDescriptions() throws IOException- Throws:
IOException
-
testAllOperatorHaveDescriptions
@Tag("operator_descriptions") @Test public void testAllOperatorHaveDescriptions() throws IOException- Throws:
IOException
-
test_makeMap2D
- Throws:
JepException
-
test_makeMap1D
- Throws:
JepException
-
test_makeMapEmpty
- Throws:
JepException
-
test_nested_dict
- Throws:
JepException
-
test_dict_with_vectors
- Throws:
JepException
-