Commit Graph

2004 Commits

Author SHA1 Message Date
Leo Balter 9481020e91 Merge pull request #1023 from anba/redeclaration
Lexical redeclarations in block- and switch-statements

Background feedback from @anba:

In https://tc39.github.io/ecma262/#sec-switch-statement-static-semantics-lexicallydeclarednames, all lexically declared names from the different case clauses are combined.
For each case clause, the LexicallyDeclaredNames definition from https://tc39.github.io/ecma262/#sec-block-static-semantics-lexicallydeclarednames applies, which has:

```
StatementListItem : Declaration
  1. Return the BoundNames of Declaration.
```

And in https://tc39.github.io/ecma262/#prod-Declaration we've got:

```
Declaration[Yield, Await] : HoistableDeclaration[?Yield, ?Await, ~Default]
```

And in https://tc39.github.io/ecma262/#prod-HoistableDeclaration:

```
HoistableDeclaration[Yield, Await, Default] : FunctionDeclaration[?Yield, ?Await, ?Default]
```

And the BoundNames of a FunctionDeclaration is its BindingIdentifier https://tc39.github.io/ecma262/#sec-function-definitions-static-semantics-boundnames.

And there's also B3.3.5 (https://tc39.github.io/ecma262/#sec-switch-duplicates-allowed-static-semantics) which allows duplicate FunctionDeclarations in sloppy mode in switch-statements.
2017-05-05 13:04:26 -04:00
Leo Balter fbf992bd3f Merge pull request #1024 from anba/assert-lib-intl402-rebase
Switch to assert-lib in intl402
2017-05-05 12:19:48 -04:00
André Bargull 0271179c4a Use assert-lib: intl402/PluralRules 2017-05-04 21:25:02 +02:00
André Bargull bfac377fca Use assert-lib: intl402 2017-05-04 21:16:14 +02:00
André Bargull 3841b0a09e Use assert-lib: intl402/String 2017-05-04 21:15:31 +02:00
André Bargull 8bed4d442d Use assert-lib: intl402/NumberFormat 2017-05-04 21:14:46 +02:00
André Bargull 315031c07d Use assert-lib: intl402/Number 2017-05-04 21:14:05 +02:00
André Bargull c63cb39cbb Use assert-lib: intl402/Intl 2017-05-04 21:13:23 +02:00
André Bargull 1579764e37 Use assert-lib: intl402/DateTimeFormat 2017-05-04 21:12:42 +02:00
André Bargull 94e9ad831e Use assert-lib: intl402/Date 2017-05-04 21:12:00 +02:00
André Bargull 3aa427257b Use assert-lib: intl402/Collator 2017-05-04 21:10:58 +02:00
André Bargull 49221fce1f Remove no longer needed manual redeclaration tests 2017-05-04 09:34:34 -07:00
André Bargull c8e808bc69 Generate new tests for redeclarations in block- and switch-statements 2017-05-04 09:29:39 -07:00
André Bargull 2763c3b178 Add templates for lexical redeclarations in block- and switch-statements 2017-05-04 09:29:38 -07:00
André Bargull dd1f55a3dc Allow to specify negative frontmatter values in templates files 2017-05-04 09:29:37 -07:00
Joseph Pecoraro 19eb1d2e02 Add tests for completion value of function / class declaration statements (#1012) 2017-05-04 11:22:28 -04:00
Rick Waldron 278c9ad994 Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-03 15:04:08 -04:00
Rick Waldron c3c8d6f099 for-await-of: dstr-binding, error, async func & async gen templates
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-03 12:51:55 -04:00
Leo Balter c1e2572143 Merge pull request #1011 from rwaldron/dstr-binding_for-await-of-async-gen
for-await-of: dstr-binding, async func & async gen templates
2017-05-02 15:38:41 -04:00
André Bargull e0c29310d9 Generate tests for yield and await as identifier 2017-05-02 12:09:33 -07:00
André Bargull 490b2dc461 Remove manual tests for 'yield' in generators 2017-05-02 12:09:32 -07:00
André Bargull 36a8672ae6 Add templates for escaped and unescaped 'yield' and 'await' as identifiers 2017-05-02 12:09:31 -07:00
André Bargull d887db88ee Add tests escaped/unescaped yield/await labels 2017-05-02 12:09:30 -07: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
André Bargull 69735fd832 Move unary plus tests into correct directory 2017-05-02 12:09:26 -07:00
André Bargull 4494db10b7 Rename and update assignment early error tests 2017-05-02 12:09:25 -07:00
André Bargull 4d95f88c08 Rename and consolidate tests in keywords directory 2017-05-02 12:09:23 -07:00
André Bargull bd7c280e92 Rename and consolidate tests in reserved-words directory 2017-05-02 12:09:22 -07:00
André Bargull 053d63fd0d Rename and consolidate tests in future-reserved-words directory 2017-05-02 12:09:21 -07:00
Rick Waldron 376d9a57a7 Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-01 17:19:50 -04:00
Rick Waldron 8f7dc1912a for-await-of: dstr-binding, async func & async gen templates
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-01 17:19:50 -04:00
Mathias Bynens d5e1150325 Add regular RegExp Unicode property escape tests (#1014)
Ref. https://github.com/mathiasbynens/unicode-property-escapes-tests/pull/8.
2017-05-01 13:25:51 -04:00
Mathias Bynens 09f01de87e CONTRIBUTING: Fix typo (#1013) 2017-05-01 13:22:49 -04:00
Leo Balter d23063c7aa Merge pull request #1002 from leobalter/async-async
Add early error cases for `async async` in property definitions
2017-05-01 12:34:00 -04:00
Leo Balter 666f0e920a
Add assert.throws.early 2017-05-01 12:29:52 -04:00
Leo Balter 0ad3d51fd9
Add an early error case for ({ async async }) 2017-05-01 12:29:23 -04:00
Leo Balter ca314476a9 Update RegExp tests for named-capturing and dotAll (#1009)
* Split order tests for RegExp#flags

* small fixes for RegExp named groups

* Remove invalid syntax

* The test mustn't include the global flag
2017-05-01 12:08:31 -04:00
jugglinmike 74954bfa91 Introduce automated validation for test format (#994)
This script is intended to identify common test file formatting errors
prior to their acceptance into the project. It is designed to support
future extensions for additional validation rules.
2017-05-01 12:04:05 -04:00
Leo Balter 7bb4cd8f41 Merge pull request #1010 from rwaldron/dstr-binding_for-await-of
for-await-of: dstr-binding templates
2017-04-28 17:32:46 -04:00
Rick Waldron 5b2ffd2def Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-04-28 17:23:17 -04:00
Rick Waldron 684449a65f for-await-of: dstr-binding templates
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-04-28 17:02:43 -04:00
Rick Waldron 6fc8082e64 Merge pull request #963 from leobalter/prop-descs
Cleanup prop desc tests in the Array folder
2017-04-28 14:51:57 -04:00
Leo Balter f77a406ebc Update links to the specs (#1005) 2017-04-27 19:38:14 -04:00
Leo Balter a09f857ed8 Merge pull request #1006 from leobalter/fix-info
Update RegExp#dotAll tests
2017-04-27 19:37:54 -04:00
Leo Balter ac43ea515c Merge pull request #1007 from leobalter/littledan-lookbehind
Split tests for lookbehind
2017-04-27 19:37:29 -04:00
Leo Balter 0f10d73fef
Split tests and fix actual/expected order 2017-04-27 19:33:42 -04:00
Daniel Ehrenberg abac4e0b19
Fix up compareArray 2017-04-27 19:33:41 -04:00
Daniel Ehrenberg 6ee183a057
RegExp lookbehind tests
Tests for the stage 3 proposal at
https://tc39.github.io/proposal-regexp-lookbehind/

Tests ported from V8, written by @hashseed
2017-04-27 19:33:40 -04:00