Package com.singularsys.jeptests.system

# Class BugsTest

java.lang.Object
com.singularsys.jeptests.system.BugsTest

public class BugsTest extends Object
This class is intended to contain all tests related to reported bugs.

Author:
  Nathan Funk

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `BugsTest.CommaNumberTokenMatcher`
  A matcher for mumbers with commas in them, `1,000,000`
  `static class`
  `BugsTest.NumberWithUnit`
  Class to hold a number with a unit.
  `static class`
  `BugsTest.NumberWithUnitTokenMatcher`
  TokenMatcher used to match a number with a unit.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final boolean`
  `PRINT_RESULTS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BugsTest()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `andCustomOperatorWorks()`
  `void`
  `bug61_sum_a_b_c_over_d_parses()`
  Bug with parsing (a+b+c)/d.
  `boolean`
  `dependsOn(Node n1, Node n2)`
  Returns true if n1 depends on n2.
  `void`
  `findNewVariables()`
  `void`
  `orCustomOperatorWorks()`
  `void`
  `parsing_array_element_access_with_standard_configurable_parser_gives_constant()`
  `void`
  `parsing_array_element_access_with_standard_parser_gives_one_element_vector()`
  `void`
  `PosZeroTest()`
  `void`
  `setUp()`
  `void`
  `test_extended_ascii()`
  `void`
  `test_issue_no_6()`
  `void`
  `test1_9_11()`
  `void`
  `test167()`
  See ticked 167
  `void`
  `test18April2013()`
  `void`
  `test2008_08_14_switch()`
  `void`
  `test2008_12_13()`
  `void`
  `test2009_02_02()`
  `void`
  `test2009_02_16()`
  `void`
  `test31_8_11()`
  `void`
  `test31Jan2010()`
  `void`
  `testAlternateSymbolBug()`
  `void`
  `testAlternateSymbols()`
  Tests for other symbols used.
  `void`
  `testBigDecRoundMode()`
  `void`
  `testBug116()`
  `void`
  `testBug121A()`
  Tests a custom operator table with only 5 operators, see bug #121
  `void`
  `testBug122()`
  `void`
  `testBug123()`
  `void`
  `testBug1563324()`
  Tests [ 1563324 ] getValueAsObject always return null after an error Jep 2.4.0 checks the `errorList` variable before evaluating an expression if there is an error in the list, null is returned.
  `void`
  `testBug2008_09_12()`
  `void`
  `testBug23_11_09()`
  `void`
  `testBug28()`
  `void`
  `testBug30_10_09()`
  `void`
  `testBug49()`
  Tests bug 49.
  `void`
  `testBug72()`
  Test bug #72 Handling of Constants.
  `void`
  `testBug84()`
  `void`
  `testCarWalk()`
  `void`
  `testChangeOperatorSymbols()`
  `void`
  `testChinese()`
  Test for non latin variable names
  `void`
  `testClearValues()`
  See http://stackoverflow.com/questions/36928755/strange-behavior-in-singularsys-jep
  `void`
  `testCommaNumber()`
  `void`
  `testDottedIdentifiers()`
  `void`
  `testEvaluationPath()`
  `void`
  `testExpressionOrdering()`
  Tests use of TreeAnalyzer to work out the order of expressions.
  `void`
  `testExpressionOrderingMultiLine()`
  Tests use of TreeAnalyzer to work out the order of expressions.
  `void`
  `testFractalBug()`
  Tests a bug that lead the FractalCanvas example to fail
  `void`
  `testGetNonConstantVariables()`
  `void`
  `testJexParser()`
  `void`
  `testMultiLineLoop()`
  Tests use of TreeAnalyzer to work out the order of expressions.
  `void`
  `testNamesWithSpaces()`
  `void`
  `testNullValuedVariable()`
  Test for new setTrapUnsetValues method.
  `void`
  `testNumbersAsStrings()`
  forum
  `void`
  `testPrefixOperators()`
  `void`
  `testRegExpOp()`
  `void`
  `testSetAllowUndeclared()`
  Tests bug [ 1585128 ] setAllowUndeclared does not work!!!
  `void`
  `testSlope()`
  `void`
  `testStackCorruption()`
  Uses a special evaluator to check for stack errors
  `void`
  `testToBase()`
  `void`
  `testVectorExpressionBug_Version_3_30()`

  ### 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

- ## Constructor Details

  - ### BugsTest

    public BugsTest()

- ## Method Details

  - ### setUp

    @BeforeEach public void setUp()

  - ### testFractalBug

    @Test public void testFractalBug() throws Exception
    Tests a bug that lead the FractalCanvas example to fail. (09/04/2007)
    Throws:
      `Exception`

  - ### testSetAllowUndeclared

    @Test public void testSetAllowUndeclared()
    Tests bug [ 1585128 ] setAllowUndeclared does not work!!! setAllowedUndeclared should add variables to the symbol table.

    This test parses the expression "x" and checks whether only the variable x is in the symbol table (no more no less)

  - ### testBug1563324

    @Test public void testBug1563324() throws EvaluationException, ParseException
    Tests [ 1563324 ] getValueAsObject always return null after an error Jep 2.4.0 checks the `errorList` variable before evaluating an expression if there is an error in the list, null is returned. This behaviour is bad because errors are added to the list by getValueAsObject. If the first evaluation fails (after a successful parse) then an error is added to the list. Subsequent calls to getValueAsObject fail because there is an error in the list.
    Throws:
      `EvaluationException`
      `ParseException`

  - ### testBug49

    @Test public void testBug49()
    Tests bug 49. Adding an operator such as "AND" does not work. Instead of being interpreted as and operator it is parsed as a variable.

  - ### bug61_sum_a_b_c_over_d_parses

    @Test public void bug61_sum_a_b_c_over_d_parses() throws Exception
    Bug with parsing (a+b+c)/d. Caused by missing Grammar matcher in parser https://ar.trac.cloudforge.com/jep/ticket/61
    Throws:
      `Exception`

  - ### testBug72

    @Test public void testBug72()
    Test bug #72 Handling of Constants. Sets a constant and then tries to set the value again. The bug was that addVariable failed silently, and the fix was to add exception throwing to addVariable.

  - ### test2008_08_14_switch

    @Test public void test2008_08_14_switch() throws Exception
    Throws:
      `Exception`

  - ### testToBase

    @Test public void testToBase() throws Exception
    Throws:
      `Exception`

  - ### testBug2008_09_12

    @Test public void testBug2008_09_12()

  - ### testBug84

    @Test public void testBug84() throws Exception
    Throws:
      `Exception`

  - ### testBug28

    @Test public void testBug28() throws Exception
    Throws:
      `Exception`

  - ### test2008_12_13

    @Test public void test2008_12_13() throws Exception
    Throws:
      `Exception`

  - ### test2009_02_02

    @Test public void test2009_02_02() throws Exception
    Throws:
      `Exception`

  - ### test2009_02_16

    @Test public void test2009_02_16()

  - ### testBug116

    @Test public void testBug116() throws Exception
    Throws:
      `Exception`

  - ### testBug121A

    @Test public void testBug121A()
    Tests a custom operator table with only 5 operators, see bug #121

  - ### testBug122

    @Test public void testBug122() throws Exception
    Throws:
      `Exception`

  - ### testBug123

    @Test public void testBug123() throws Exception
    Throws:
      `Exception`

  - ### testBug30_10_09

    @Test public void testBug30_10_09() throws Exception
    Throws:
      `Exception`

  - ### testBug23_11_09

    @Test public void testBug23_11_09()

  - ### testDottedIdentifiers

    @Test public void testDottedIdentifiers() throws ParseException
    Throws:
      `ParseException`

  - ### test31Jan2010

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

  - ### testNamesWithSpaces

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

  - ### testChinese

    @Test public void testChinese() throws ParseException
    Test for non latin variable names
    Throws:
      `ParseException`

  - ### testVectorExpressionBug_Version_3_30

    @Test public void testVectorExpressionBug_Version_3_30() throws Exception
    Throws:
      `Exception`

  - ### testBigDecRoundMode

    @Test public void testBigDecRoundMode() throws Exception
    Throws:
      `Exception`

  - ### testAlternateSymbols

    @Test public void testAlternateSymbols() throws Exception
    Tests for other symbols used. Minus sign is actually unicode U+2013
    Throws:
      `Exception`

  - ### testChangeOperatorSymbols

    @Test public void testChangeOperatorSymbols() throws Exception
    Throws:
      `Exception`

  - ### testAlternateSymbolBug

    @Test public void testAlternateSymbolBug() throws Exception
    Throws:
      `Exception`

  - ### test167

    @Test public void test167() throws Exception
    See ticked 167
    Throws:
      `Exception`

  - ### testCarWalk

    @Test public void testCarWalk() throws Exception
    Throws:
      `Exception`

  - ### testPrefixOperators

    @Test public void testPrefixOperators() throws Exception
    Throws:
      `Exception`

  - ### test1_9_11

    @Test public void test1_9_11() throws Exception
    Throws:
      `Exception`

  - ### test31_8_11

    @Test public void test31_8_11()

  - ### dependsOn

    public boolean dependsOn(Node n1, Node n2) throws JepException
    Returns true if n1 depends on n2. That is if one of the variables on the rhs of n1 is the lhs variable of n2.
    Throws:
      `JepException`

  - ### testExpressionOrdering

    @Test public void testExpressionOrdering() throws Exception
    Tests use of TreeAnalyzer to work out the order of expressions.
    Throws:
      `Exception`

  - ### andCustomOperatorWorks

    @Test public void andCustomOperatorWorks() throws Exception
    Throws:
      `Exception`

  - ### orCustomOperatorWorks

    @Test public void orCustomOperatorWorks() throws Exception
    Throws:
      `Exception`

  - ### findNewVariables

    @Test public void findNewVariables() throws Exception
    Throws:
      `Exception`

  - ### testMultiLineLoop

    @Test public void testMultiLineLoop() throws ParseException, Exception
    Tests use of TreeAnalyzer to work out the order of expressions.
    Throws:
      `ParseException`
      `Exception`

  - ### testExpressionOrderingMultiLine

    @Test public void testExpressionOrderingMultiLine() throws ParseException, Exception
    Tests use of TreeAnalyzer to work out the order of expressions.
    Throws:
      `ParseException`
      `Exception`

  - ### testEvaluationPath

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

  - ### testNumbersAsStrings

    @Test public void testNumbersAsStrings() throws JepException
    forum
    Throws:
      `JepException`

  - ### testRegExpOp

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

  - ### testGetNonConstantVariables

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

  - ### testCommaNumber

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

  - ### test18April2013

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

  - ### testJexParser

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

  - ### testSlope

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

  - ### testClearValues

    @Test public void testClearValues() throws JepException
    See http://stackoverflow.com/questions/36928755/strange-behavior-in-singularsys-jep
    Throws:
      `JepException`

  - ### PosZeroTest

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

  - ### testStackCorruption

    @Test public void testStackCorruption() throws JepException
    Uses a special evaluator to check for stack errors
    Throws:
      `JepException`

  - ### parsing_array_element_access_with_standard_configurable_parser_gives_constant

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

  - ### parsing_array_element_access_with_standard_parser_gives_one_element_vector

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

  - ### test_extended_ascii

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

  - ### testNullValuedVariable

    @Test public void testNullValuedVariable() throws JepException
    Test for new setTrapUnsetValues method.
    Throws:
      `JepException`
    Since:
      Jep 3.5

  - ### test_issue_no_6

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