Commit Graph

12 Commits

Author SHA1 Message Date
André Bargull d887db88ee Add tests escaped/unescaped yield/await labels 2017-05-02 12:09:30 -07:00
André Bargull 7a86baee7d Add lookahead restriction tests for "let [" in expression statement contexts 2017-05-02 12:09:28 -07:00
André Bargull 75d153d280 Add tests to ensure async-functions/generators are not accepted in statement position 2017-05-02 12:09:27 -07:00
Mike Pennisi 7d4b1d28ae Re-format tests for SyntaxErrors
Authored via the following command:

   $ find test -type f -print0 | \
       xargs -0 sed \
         -i 's/^\(\s*\)negative:\s*SyntaxError\s*$/\1negative:\n\1  phase: early\n\1  type: SyntaxError/g'
2016-10-19 15:24:21 -04:00
Mike Pennisi 2aa8d4838b Add test for LabelledItem and ContinueStatement 2016-06-30 15:24:42 -04:00
Mike Pennisi ec9d79c027 Add missing tests for statement completion values
The project contains tests for the completion value of most (but not
all) statements. Introduce tests to complete coverage of this detail.
2016-06-30 15:24:41 -04:00
Mike Pennisi 021ed85d97 Add syntax tests for declaration restrictions
Assert that declarations are not permitted in positions reserved for
statements only.
2016-03-11 12:23:15 -05:00
Leonardo Balter bf782c8421 s/id/esid
Fixes #477
2016-02-22 09:47:42 -05:00
Mike Pennisi 4dc81d3788 Add tests for tail-call optimization
ECMAScript 2015 introduced tail call optimization for function calls
occuring in a number of positions in the grammar. Assert expected
behavior by triggering a large (but configurable) number of recursive
function calls in these positions. Compliant runtimes will execute such
programs without error; non-compliant runtimes are expected to fail
these tests by throwing an error or crashing when system resources are
exhausted.
2016-02-01 13:20:17 -05:00
Mike Pennisi e0d59b0ede Add tests for Unicode escape sequences
- Re-organize existing tests for identifiers
  Name files according to their content (not their ES5 ID). Move tests
  for IdentifierName and LabelIdentifier to more appropriate directories.
- Simplify and correct tests
  Instead of asserting successful runtime evaluation using `eval`, rely
  on the test runner's ability to detect syntax errors. Update the test
  bodies to test the grammar referenced by their ES5 ID and
  description--the IdentifierStart pattern.
- Use `negative` frontmatter to assert SyntaxErrors
- Remove redundant tests
- Use `assert.equal` helper function
- Add equivalent tests for literal unicode chars
- Add tests for variable-length unicode escape
2015-07-09 18:52:22 -04:00
André Bargull e31ae1ad9f Invalid language tests
- in-statement-position-label-statement.js is an Annex-B test (B.3.2 Labelled Function Declarations), moved to annexB directory
- identifier-let-allowed-as-lefthandside-expression-strict.js needs to check for a SyntaxError (ES6, 12.1.1)
- Remove sort() calls in test/built-ins/Object/getOwnPropertyNames/*.js
- Remove sort() calls in test/language/block-scope/syntax/for-in/acquire-properties-from-*.js
- verifyConfigurable() needs to called last in test/built-ins/Object/is/length.js
- All productions within ClassBody are implicitly strict, update test/language/class/method-definition/yield-as-*.js accordingly
- Remove unnecessary noStrict flag in test/language/class/method-definition/yield-as-generator-method-binding-identifier.js
- Check own symbols are returned in property creation order from Object.getOwnPropertySymbols():
  - test/language/computed-property-names/basics/symbol.js
  - test/language/computed-property-names/class/method/symbol.js
  - test/language/computed-property-names/class/static/method-symbol.js
  - test/language/computed-property-names/object/method/symbol.js
- Fix copy-paste error in test/language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js
2015-04-27 16:56:19 +02:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00