Package com.singularsys.jeptests.unit.misc.dictionary

# Class DictionaryTests

java.lang.Object
com.singularsys.jeptests.unit.misc.dictionary.DictionaryTests

Direct Known Subclasses:
  `DictionaryTestsWithNull`, `DictionaryWithListNoNullTest`

@Tag("dictionaries") public abstract class DictionaryTests extends Object
Abstract base class for test for the `com.singularsys.jep.misc.dictionary` package.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final record`
  `DictionaryTests.KeyValue`
  Represents a key value pair

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Operator`
  `entryOp`
  `protected Jep`
  `jep`
  `protected Operator`
  `listOrMapOp`
  `protected Object`
  `nullValue`
  `static final boolean`
  `PRINT_RESULTS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DictionaryTests()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `checkOrMake(String name)`
  Check if the function should exists, or not.
  `boolean`
  `equals(Object ele, Object d)`
  Test if a element is equal to a double.
  `Jep`
  `getJep()`
  `DictionaryTests.KeyValue`
  `getKeyValue(Object ele)`
  Convert and element to key-value pair.
  `protected Object`
  `getNumber(double d)`
  Convert a double value to the number type used by this implementation.
  `void`
  `myAssertEquals(double expected, Object actual)`
  Asserts if the two values are equal, possible converting the double.
  `void`
  `test_dict_with_vectors()`
  `void`
  `test_makeMap1D()`
  `void`
  `test_makeMap2D()`
  `void`
  `test_makeMapEmpty()`
  `void`
  `test_nested_dict()`
  `void`
  `testAllFunctionsHaveDescriptions()`
  `void`
  `testAllOperatorHaveDescriptions()`
  `void`
  `testClear()`
  `void`
  `testContainsKey()`
  `void`
  `testEntries()`
  `void`
  `testEntriesIter()`
  `void`
  `testEvaluateDouble()`
  `void`
  `testEvaluateEmpty()`
  `void`
  `testEvaluateSingle()`
  `void`
  `testGet()`
  `void`
  `testGetOr()`
  `void`
  `testkeys()`
  `void`
  `testKeysIter()`
  `protected void`
  `testListOrMapSize(Object val, int n)`
  `void`
  `testParseDouble()`
  `void`
  `testParseEmpty()`
  `void`
  `testParseSingle()`
  `void`
  `testParseSingleNoVal()`
  `void`
  `testPrintDouble()`
  `void`
  `testPut()`
  `void`
  `testRemove()`
  `void`
  `testSize()`
  `void`
  `testValues()`
  `void`
  `testValuesIter()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### PRINT_RESULTS

    public static final boolean PRINT_RESULTS

  - ### jep

    protected Jep jep

  - ### listOrMapOp

    protected Operator listOrMapOp

  - ### entryOp

    protected Operator entryOp

  - ### nullValue

    protected Object nullValue

- ## Constructor Details

  - ### DictionaryTests

    public DictionaryTests()

- ## Method Details

  - ### getJep

    public Jep getJep()

  - ### equals

    public boolean equals(Object ele, Object d) throws EvaluationException
    Test if a element is equal to a double. Default is simply `ele.equals(d)`.
    Parameters:
      `ele` - element to test
      `d` - number may be converted
    Returns:
      true if equals after conversion
    Throws:
      `EvaluationException`

  - ### myAssertEquals

    public void myAssertEquals(double expected, Object actual)
    Asserts if the two values are equal, possible converting the double. Default is simple assertEquals(expected,actual)
    Parameters:
      `expected` - expected number, may be converted
      `actual` - value to test, un-converted

  - ### getNumber

    protected Object getNumber(double d)
    Convert a double value to the number type used by this implementation. Default simple retuurns `d`.
    Parameters:
      `d` - number
    Returns:
      object representing the number

  - ### getKeyValue

    public DictionaryTests.KeyValue getKeyValue(Object ele) throws EvaluationException
    Convert and element to key-value pair.
    Parameters:
      `ele` - representing a key-value pair
    Returns:
      the pair
    Throws:
      `EvaluationException`

  - ### testParseEmpty

    @Test public void testParseEmpty() throws JepException
    Throws:
      `JepException`

  - ### testEvaluateEmpty

    @Test public void testEvaluateEmpty() throws JepException
    Throws:
      `JepException`

  - ### testParseSingle

    @Test public void testParseSingle() throws JepException
    Throws:
      `JepException`

  - ### testEvaluateSingle

    @Test public void testEvaluateSingle() throws JepException
    Throws:
      `JepException`

  - ### testParseSingleNoVal

    @Test public void testParseSingleNoVal() throws JepException
    Throws:
      `JepException`

  - ### testParseDouble

    @Test public void testParseDouble() throws JepException
    Throws:
      `JepException`

  - ### testEvaluateDouble

    @Test public void testEvaluateDouble() throws JepException
    Throws:
      `JepException`

  - ### testPrintDouble

    @Test public void testPrintDouble() throws JepException
    Throws:
      `JepException`

  - ### testGetOr

    @Test public void testGetOr() throws JepException
    Throws:
      `JepException`

  - ### testGet

    @Test public void testGet() throws JepException
    Throws:
      `JepException`

  - ### testContainsKey

    @Test public void testContainsKey() throws JepException
    Throws:
      `JepException`

  - ### testPut

    @Test public void testPut() throws JepException
    Throws:
      `JepException`

  - ### testListOrMapSize

    protected void testListOrMapSize(Object val, int n)

  - ### testRemove

    @Test public void testRemove() throws JepException
    Throws:
      `JepException`

  - ### testClear

    @Test public void testClear() throws JepException
    Throws:
      `JepException`

  - ### testkeys

    @Test public void testkeys() throws JepException
    Throws:
      `JepException`

  - ### testValues

    @Test public void testValues() throws JepException
    Throws:
      `JepException`

  - ### testSize

    @Test public void testSize() throws JepException
    Throws:
      `JepException`

  - ### testEntries

    @Test public void testEntries() throws JepException
    Throws:
      `JepException`

  - ### testEntriesIter

    @Test public void testEntriesIter() throws JepException
    Throws:
      `JepException`

  - ### testKeysIter

    @Test public void testKeysIter() throws JepException
    Throws:
      `JepException`

  - ### checkOrMake

    public void checkOrMake(String name)
    Check if the function should exists, or not. If it does not make the function
    Parameters:
      `name` - function name

  - ### testValuesIter

    @Test public void testValuesIter() throws JepException
    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

    @Test public void test_makeMap2D() throws JepException
    Throws:
      `JepException`

  - ### test_makeMap1D

    @Test public void test_makeMap1D() throws JepException
    Throws:
      `JepException`

  - ### test_makeMapEmpty

    @Test public void test_makeMapEmpty() throws JepException
    Throws:
      `JepException`

  - ### test_nested_dict

    @Test public void test_nested_dict() throws JepException
    Throws:
      `JepException`

  - ### test_dict_with_vectors

    @Test public void test_dict_with_vectors() throws JepException
    Throws:
      `JepException`