Commit Graph

45 Commits

Author SHA1 Message Date
Rick Waldron 38150b3535 Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 15:49:02 -04:00
Mike Pennisi ef76e548a4 Re-generate tests 2017-06-28 11:24:36 -04:00
Mike Pennisi 81d00def42 Force "early error" tests to fail if evaluated
This pattern makes expectations more explicit by making test files more
literal.
2017-06-28 11:24:36 -04:00
Rick Waldron 2dd8e8b2c4 Throw away tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-23 13:21:39 -04:00
Caio Lima 8f5afc2915 Generated tests for computed property Object rest destructuring 2017-05-22 23:05:35 -03:00
Leo Balter 5204678e8f
Generate tests 2017-05-15 15:25:33 -04:00
Leo Balter 5f04d2b1f3
Generate tests 2017-05-10 14:08:35 -04:00
André Bargull 3d8fe2af4c Add tests for contextual keywords with escape sequences 2017-05-02 12:09:29 -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
Leo Balter d93e15662f
Generate Tests 2017-04-25 15:56:28 -04:00
Leo Balter 2adebecbfa
Generate tests 2017-03-27 13:21:14 -04:00
Leonardo Balter 92ac53f210
Generate tests 2017-03-20 14:50:53 -04:00
Leonardo Balter 368d483490
Generate tests 2017-03-14 17:42:04 -04:00
Leonardo Balter 0cc55bb44d
Generate tests 2017-03-06 16:25:14 -05:00
André Bargull 6b09ad0459 Update YAML frontmatter of some tests to be compatible with monkeyYaml (#862) 2017-03-01 16:35:37 -05: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 cdc62ce0fa Re-generate tests 2016-10-19 15:24:20 -04:00
Tom Care 163fae3e68 Merge pull request #715 from bocoup/audit2016-section-13
Improve coverage for section 13, "Statements and Declarations"
2016-07-12 13:51:15 -07:00
jugglinmike 2bfaa0d895 Improve coverage for class "name" inference (#718)
* Extend tests for class "name" inference

Ensure that when a class defines a static "name" method, that method
definition prevents the "name" inference behavior.

* Re-generate tests
2016-07-08 18:37:04 -07:00
Mike Pennisi ce2e421464 Add tests for interpretation of `let` token 2016-06-30 15:24:42 -04:00
Mike Pennisi 53df13bf9d Complete test coverage for labelled fn decls
Ensure that early errors restricting labelled function declarations
within WithStatement and IfStatement are honored. Rename existing tests
to match the specification's spelling.
2016-06-30 15:24:42 -04:00
jugglinmike be19aaa18e Add tests ensuring iterator is not closed (#702)
A subtle aspect of the for-of iteration protocol concerns abrupt
completions that do *not* trigger iterator closing. Although this detail
is implicit in the current structure of the specification text, some
hosts may violate the protocol by closing the iterator because later
steps *do* specify that behavior.

The V8 engine is one such host--as of this writing, it incorrectly
closes the iterator when accessing the `value` property of the iterator
result produces an abrupt completion.

Add tests verifying that the iterator protocol is not violated in this
way for abrupt completions during the semantics of for-of evaluation.
2016-06-28 10:55:18 -04:00
Leo Balter 2cf968cfad Merge pull request #651 from bocoup/generation-dstr-assign
Re-format destructuring assignment tests
2016-06-01 14:00:09 -04:00
Leo Balter 8f23cd6775 Merge pull request #607 from bocoup/envs
Add tests for Lexical Environment management
2016-05-30 16:13:33 -04:00
Mike Pennisi 88879de735 Generate tests 2016-05-25 17:29:27 -04:00
Mike Pennisi d4b263ccbb Generate tests 2016-05-10 11:57:37 -04:00
Mike Pennisi 3b3bd06819 Add tests for Lexical Environment management
Add tests that assert the management of the running execution context's
LexicalEnvironment and VariableEnvironment components, as created by the
following abstract operations:

- NewDeclarativeEnvironment
- NewObjectEnvironment
- NewFunctionEnvironment

Many tests require the use of non-strict direct eval, meaning they may
not be run in strict mode. This does not effect coverage because the
semantics in these cases are not observable from strict mode code.

Some situations require the creation of a binding, but this binding has
no relevance to the test itself. In these cases, use names consisting
solely of the underscore character (`_`).

Avoid the use of Block statements wherever possible, as these trigger
the creation of additional environments which may interfere with the
behavior under test.
2016-04-28 09:44: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
Mike Pennisi 4dd2d9b7ee Add tests for IterationStatement early errors 2016-02-25 14:21:08 -08:00
Mike Pennisi 62857dcba7 Rename IterationStatement tests
- Prefix file names to explicitly describe the "head" position
- Remove statement name suffix as this information is reflected by each
  file's location within the file hierarchy
2016-02-16 12:03:21 -05:00
Mike Pennisi 407b8964ce Add tests for ES2015 completion reform
In order to facilitate proper tail calls, ES2015 modified the completion
value of a number of statements.

These tests use `eval` to verify the new values.
2016-01-22 15:00:03 -05:00
Mike Pennisi 19762b927a Add tests for iterator expression in ForIn/Of head
Although the `for..in` statement allows Expressions to define the
iterator, only an AssignmentExpression may occupy this position in the
`for..of` statement.
2016-01-19 12:27:33 -05:00
André Bargull 023c7aa69e - Remove inline license
- Remove duplicate word
- Add missing license
2015-07-17 19:55:00 +02:00
Mike Pennisi 10e0d977ec Prefer explicit error checking where possible
The `negative` frontmatter tag expresses an expectation for the behavior
of the test file as a whole. The `assert.throws` helper function offers
more fine-grained control over expectations because it may be applied to
specific statements and expressions. This makes it preferable in cases
where it may be used (i.e. when the test body does not describe a syntax
error or early error).

Re-implement assertions for errors to use the `assert.throws` helper
function wherever possible.
2015-07-10 14:12:57 -04:00
Mike Pennisi 92a735dad7 Create distinct tests for arguments object types 2015-06-18 16:01:49 -04:00
Mike Pennisi 03f8ca8336 Move `for-of` tests to appropriate directory 2015-06-18 15:53:24 -04:00
Mike Pennisi a321e87a2d Add tests for `for..of` iteration over built-ins 2015-06-18 15:53:19 -04:00
Mike Pennisi c541cc4336 Increase coverage for for..of iteration 2015-05-27 15:14:51 -04:00
Mike Pennisi 0900ac0ae8 Annotate tests with required features 2015-05-27 11:36:10 -04:00
Mike Pennisi 19e6755f61 Correct test frontmatter 2015-05-26 17:31:34 -04:00
André Bargull 89a4bb5ae4 Fix strict mode errors in language
- Add missing "var" declarations and noStrict flags
- Add strict mode tests for:
 - arguments-object/10.6-6-3 -> arguments-object/10.6-6-3-s
 - arguments-object/10.6-6-4 -> arguments-object/10.6-6-4-s
- Remove try-finally clean-up code
- Add strict mode compatible tests for eval-code/S10.4.2_A1.1_T*
  - No strict mode compatible files added for eval-code/S10.4.2_A1.2_T*, because it doesn't really make sense in this context.
  - (S10.4.2_A1.1 and S10.4.2_A1.2 should probably be removed, because the tested behaviour is not required by the spec.)
- Split S8.5_A10, S8.5_A4 and S8.1_A3 into declaration (both modes) and assignment tests (non-strict only)

Part of issue #35.
2015-05-08 17:27:52 +02:00
Brian Terlson d25eca4184 Merge pull request #213 from bocoup/block-scope-additions
Import tests from Google V8 (Block Scope Additions)
2015-04-21 15:24:54 -07:00
Mike Pennisi 3bf5652774 Improve `for..of` control flow tests
- Expand ambiguous assertion messages and assert execution paths more
  finely.
- Improve variable names in `for..of` tests
  While the object created by a GeneratorFunction may be considered an
  "iterable", it is being used as an iterator in these tests. Naming the
  variable according to the way it is used improves the readability of
  the test body.
- Add 'features' attribute to test frontmatter
- Move tests
- Introduce additional `for..of` control flow tests
2015-04-21 12:55:27 -04:00
Rick Waldron 44c65fd02a Import tests from Google V8 (Block Scope Additions)
These tests are derived from the following files within the Google V8 project:

    test/mjsunit/es6/regress/regress-2506.js
    test/mjsunit/es6/regress/regress-3426.js
    test/mjsunit/es6/regress/regress-3683.js
2015-04-09 14:21:06 -04:00