JS-Interpreter icon indicating copy to clipboard operation
JS-Interpreter copied to clipboard

Adding test harness to current implementation

Open hath995 opened this issue 9 years ago • 1 comments

To run the tests: npm install -g mocha npm install chai

mocha tests/

hath995 avatar May 01 '16 07:05 hath995

Just to be clear with the current implementation of try/catch/finally. The following tests fail:

  1. Should handle the exception in the outer try catch exception, and finish inner finally
  2. Should handle rethrowing the error, and catching in the outer (infinite loop)
  3. Should not catch if returning early in a finally block (infinite loop)
  4. It should not leave undone finally statements for uncaught exceptions
  5. return should respect finally
  6. return should respect catch and finally
  7. try/catch/finally should respect continue statements

hath995 avatar May 01 '16 18:05 hath995