Commit Graph

771 Commits

Author SHA1 Message Date
Robin Templeton a9092bdbdf [BigInt] ToPrimitive called without hint for equality 2017-10-16 12:57:33 -04:00
Robin Templeton 11cd9e4c34 [BigInt] typeof 2017-10-16 12:56:49 -04:00
Rick Waldron 5d4c667b27 test/language/literals/regexp/*: early error test fixups (#1276) 2017-10-16 12:46:28 -04:00
Josh Wolfe 0b5c39cf91 BigInt unary minus tests (#1269) 2017-10-12 16:55:22 -04:00
Leo Balter edfef8db55 Updates for let names as a LHS in for-in loops (#1271)
* Delete identifier-let-allowed-as-lefthandside-expression-non-strict.js

Fixes #1192

This is already covered by 8422147c17/test/language/statements/for-in/head-lhs-let.js (L27)

* restore for-in test
2017-10-12 15:27:15 -04:00
Leo Balter 9915c713c6 Merge pull request #1263 from thejoshwolfe/messages
Add messages to asserts and use mixed quotes instead of escapes
2017-10-06 12:34:04 -04:00
Josh Wolfe 5cffebca94 use mixed quotes to avoid escape sequences in messages 2017-10-06 02:28:46 -07:00
Josh Wolfe 30e192da57 add messages to relational comparison tests 2017-10-06 02:25:58 -07:00
Leo Balter b3092c61b6 Add generators flags for tests depending on generators features (#1259)
* Add missing generators feature flags

* Generate files

* Add generators flags

* fixup! Add generators flags
2017-10-04 16:12:34 -04:00
Leo Balter 60c232b4d4 Merge pull request #1250 from caitp/AsyncFixesFor988
Update async iteration tests with respect to pending spec change
2017-10-04 11:58:37 -04:00
Josh Wolfe a88b08f3fe Increment/decrement tests for references to BigInt values (#1261) 2017-10-04 11:55:24 -04:00
Josh Wolfe 6443289089 Equality comparison tests for bigint (#1257) 2017-10-04 11:54:00 -04:00
Caitlin Potter 0881a6a2ad Generate tests 2017-10-04 11:24:27 +02:00
Josh Wolfe aca48e4dfd Improve coverage for BigInt relational comparison tests (#1251) 2017-10-02 15:40:32 -04:00
⭐caitp⭐ f3b5a1e4c0 Update iteration tests with respect to spec changes (#1248)
https://github.com/tc39/ecma262/pull/988 changes the iteration protocol
such that the "next" method is only loaded from the iterator object once
during the prologue of iteration, rather than during each step.
2017-09-27 17:59:41 -04:00
Caio Lima d41eb5d913 Added test case to consider rest ordering (#1242) 2017-09-26 17:02:42 -04:00
Leo Balter 249935bd37 Follow up for tagging tests with U+180E 2017-09-26 14:13:29 -04:00
Leo Balter 60782de95e Tag tests for U+180E and complete coverage for RegExp matching 2017-09-25 15:27:59 -04:00
Leo Balter 7cbbe51216 Add cross-realm feature 2017-09-22 15:29:10 -04:00
Leo Balter 134bfcd2b3 Merge pull request #1228 from anba/destructuring-order-return
Change destructuring tests to not rely on exact evaluation order for property references
2017-09-19 14:38:08 -04:00
Leo Balter 968a2e0466 Add tests to verify valid object shorthand properties
Fixes #1202
2017-09-18 17:26:40 -04:00
André Bargull 87e259c6e5 Add replacement tests for destructuring evaluation order with property reference as target 2017-09-16 17:00:56 +02:00
André Bargull 58111fff7b Regenerate tests 2017-09-16 17:00:55 +02:00
Leo Balter 7f88a6d7f9 Add other missing Symbol feature flags 2017-09-08 10:13:50 -04:00
Leo Balter 2bee5df77a Add missing Symbol.iterator feature flags 2017-09-08 10:13:50 -04:00
Leo Balter 9f526c0bcd Re-generate tests 2017-09-08 10:13:50 -04:00
Leo Balter 7630235d5d Re-generate tests 2017-09-08 10:13:36 -04:00
Leo Balter 9376782c6e Regenerate tests 2017-09-07 15:51:13 -04:00
Leo Balter c41faf1aca Add missing Symbol features flags 2017-09-07 15:51:13 -04:00
André Bargull acea687a11 Fix BigInt less-than operator test when both operands have the same MV 2017-09-05 21:04:20 +02:00
Leo Balter 2068d024b5
fixup! More fixes for bigint and MIN_VALUE comparisons 2017-09-05 14:10:05 -04:00
Leo Balter d753349056
More fixes for bigint and MIN_VALUE comparisons 2017-09-05 13:56:00 -04:00
Leo Balter 2f655036d4 Fix assertion for Number.MIN_VALUE >= 0n
Ref https://github.com/tc39/test262/pull/1198#discussion_r137060514
2017-09-05 13:45:08 -04:00
Leo Balter 391ce890b8 Merge pull request #1205 from anba/class-fields-fixes
Misc. class fields fixes
2017-09-05 11:16:19 -04:00
André Bargull 76ff88ff2f Regenerate tests 2017-09-04 09:42:06 -04:00
André Bargull 672cfcf220 Regenerate tests 2017-09-01 23:45:01 +02:00
Isiah Meadows 8924aef732 Update decl-fun.js 2017-08-30 06:52:17 -04:00
Marshall Roch 3760b802ca Typo in test/language/statements/labeled/continue.js 2017-08-29 22:46:11 -07:00
Daniel Ehrenberg dcf6b7b743 Merge pull request #1198 from leobalter/bigint-ctor
Basic tests for BigInt
2017-08-29 22:49:05 +02:00
Leo Balter 7765873c3e
Refactor tests for the BigInt construtor 2017-08-25 15:56:11 -04:00
Leo Balter bb9fc81101
Add tests for invalid BigInt MVs 2017-08-25 15:54:39 -04:00
Robin Templeton 37beb36524
add BigInt tests 2017-08-24 15:58:14 -04:00
Leo Balter a7ccd3042b
Generate tests 2017-08-24 14:11:28 -04:00
Leo Balter 8422147c17 Revert "Tests for NumericSeparatorLiteral. Closes gh-1051" (#1188) 2017-08-21 11:54:21 -04:00
Leo Balter e88fea4682 Merge pull request #1176 from rwaldron/1051
Tests for NumericSeparatorLiteral. Closes gh-1051
2017-08-21 11:53:35 -04:00
Rick Waldron 4f4039f716 try/catch: catch parameter bound names clean up (#1172) 2017-08-21 11:30:09 -04:00
Leo Balter 1624816d81 Re-Generate tests 2017-08-18 18:16:55 -04:00
Lucas Azzola 75db6744eb Add optional-catch-binding tests (#1167) 2017-08-18 17:19:48 -04:00
Leo Balter eb93f96911 Merge pull request #1182 from rwaldron/1181
features: generator => generators. Fixes gh-1181
2017-08-18 17:19:01 -04:00
Leo Balter 626e823b46 Merge pull request #1185 from rwaldron/obj-rest-removal
Removes previously missed object rest `...{` cases.
2017-08-18 17:18:36 -04:00
Rick Waldron 3ca040f892 Throw away tests 2017-08-18 17:11:02 -04:00
Rick Waldron 844e317ba6 Tests for NumericSeparatorLiteral. Closes gh-1051 2017-08-17 09:50:33 -04:00
Rick Waldron dffbe50668 Generate tests 2017-08-16 15:11:44 -04:00
Marshall Roch eaffe8671c Fix description typo (#1180) 2017-08-15 19:05:33 -04:00
Rick Waldron da4b85d58d Remove incorrect early error machinery. Fixes gh-1175 (#1177) 2017-08-14 16:02:30 -04:00
Rick Waldron bcd308b553 remove garbage: these try/catch tests don't actually test the section cited (or anything for that matter)
Cited: https://www.ecma-international.org/ecma-262/5.1/index.html#sec-12.14.1

Present: https://tc39.github.io/ecma262/#sec-strict-mode-of-ecmascript

> It is a SyntaxError if a CatchParameter occurs within strict mode code and BoundNames of CatchParameter contains either eval or arguments (13.15.1).
2017-08-11 13:18:26 -04:00
Georg Neis fd5054f463 Relax [[DefineOwnProperty]] on module namespace exotic objects.
See https://github.com/tc39/ecma262/pull/858.
2017-08-07 10:50:02 -04:00
Rick Waldron cc70c52547 Throw away tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-07-25 10:55:29 -04:00
Rick Waldron 5326cc5ded Generate tests
See e731114cff

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-07-13 14:48:48 -04:00
Mike Pennisi e27b5e26c8 Ensure evaluation does not occur 2017-07-13 12:27:29 -04:00
Mike Pennisi 3269aea2ab Remove faulty `throw` statements
The `throw` statements that were recently inserted into these tests have
an observable impact on the parsing behavior: they causes the `"use
strict"` token sequence to be interpreted as a string literal instead of
a directive prolog, which in turn effects how the tests are interpreted.

Remove the new `throw` statements from these tests and rely on
previously-existing statements that serve the same purpose without
impacting program strictness.
2017-07-13 12:27:29 -04:00
Daniel Ehrenberg 193779ee0c Add ASI let/yield test (#1084)
I had previously intended to add this test in
https://github.com/tc39/test262/pull/968 ,
but it seems like I instead checked in a copy of another test. This
patch changes it to test what was initially intended, which is part of
the semantics for https://github.com/tc39/ecma262/pull/885
2017-06-30 10:26:50 -04:00
Rick Waldron 38150b3535 Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 15:49:02 -04:00
Rick Waldron 144d73ef27 Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 12:10:19 -04:00
Rick Waldron 86209d8fd9 Make all harness/* file names consistent; update occurrences in test
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:58 -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
Kevin Gibbons 1ca752482d Add test that noctal escapes are forbidden in strings in strict code 2017-06-19 12:03:47 -07:00
Leo Balter 6110675fd3 Merge pull request #1045 from caiolima/obj-rest-computed-prop
Adding case to computed property
2017-06-12 19:22:53 -03:00
Rick Waldron 44e19a0fe6 Throw away tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-12 17:10:27 -04:00
Rick Waldron c8574edd9c Merge pull request #968 from littledan/no-let-yield-await-asi
Tests for PR to Prohibit ASI between 'let' and 'yield'/'await'
2017-06-09 13:14:35 -04:00
Rick Waldron 670731a25e Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-31 16:05:26 -04:00
Rick Waldron 60a6a7c81e Merge pull request #1039 from rwaldron/dstr-assignment_for-await-of
[WIP] for-await-of: dstr-assignment, templates & cases
2017-05-31 15:46:40 -04:00
Caio Lima 8f5afc2915 Generated tests for computed property Object rest destructuring 2017-05-22 23:05:35 -03:00
Rick Waldron 0a66e9b9de Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-22 16:03:23 -04:00
Leo Balter dde12905df
Generate tests 2017-05-16 17:32:25 -04:00
Rick Waldron 9f3b85fb21 for-await-of: dstr-assignment, default template
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-16 13:24:41 -04:00
Rick Waldron 2b0a8cc1c4 Merge pull request #1037 from leobalter/asyncIterators
Add templates for dstr-binding w/ for-await-of looping over async iterators
2017-05-16 09:25:23 -04:00
Leo Balter 8d7e98265c
Generate tests 2017-05-15 16:02:44 -04:00
Leo Balter 5204678e8f
Generate tests 2017-05-15 15:25:33 -04:00
Leo Balter 17b13b9d01 Merge pull request #1020 from rwaldron/dstr-binding_for-await-of-async-gen-func-error
for-await-of: dstr-binding, error, async func & async gen templates
2017-05-12 18:28:39 -04:00
Rick Waldron 5f274a8581
Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-12 16:01:41 -04:00
Leo Balter 5f04d2b1f3
Generate tests 2017-05-10 14:08:35 -04:00
Leo Balter ed714d702a Merge pull request #1017 from anba/expr-lookahead-restr
Expression statement lookahead restriction and identifier tests
2017-05-09 18:38:11 -04:00
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
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
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
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 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
Leo Balter 0ad3d51fd9
Add an early error case for ({ async async }) 2017-05-01 12:29:23 -04:00
Rick Waldron 5b2ffd2def Generate tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-04-28 17:23:17 -04:00
Leo Balter d93e15662f
Generate Tests 2017-04-25 15:56:28 -04:00
Leo Balter d74f58cddd
Generate tests 2017-04-21 15:26:46 -04:00
Leo Balter 20d496729d
Rename src/params to src/function-forms
The templates are being used for many tests reusing the same available function forms.
The format they are provided allow us to extend tests with cases for other tests relying
in the same formats.
2017-04-21 15:03:46 -04:00
Mike Pennisi 2c0c3e7f96 Correct typo in copyright information 2017-04-18 12:23:22 -04:00
André Bargull d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
Daniel Ehrenberg 799568fe26 Fix commit messages 2017-04-11 23:58:04 +02:00
Daniel Ehrenberg dbfca4581d Prohibit ASI between 'let' and 'yield'/'await'
Inspired by https://github.com/tc39/test262/pull/956
2017-04-11 22:34:43 +02:00
Jeff Walden 6fe9488ec7 Add tests for the behavior of |let <newline> await| in normal and async functions. 2017-04-11 22:21:48 +02:00
Caitlin Potter 53ab9ffd4e Generate tests 2017-04-10 18:29:53 -04:00
André Bargull faaa4685e4 Remove invalid async-flag from syntax error tests (#959) 2017-04-10 14:34:57 -04:00
Rick Waldron 3c79e9dbac Merge pull request #953 from leobalter/syg-async-lineterm
Update cases for async arrow fns with a line terminator
2017-04-07 16:25:51 -04:00
Leo Balter 6030e4ed71
Update object literal expressions for readability
After @rwaldron's feedback:

The purpose of the `!` operator is to evaluate an UnaryExpression,
coerce the result to a boolean value and then return the negated
value of that operation. But that's not what you're trying to do at
all—you just want to evaluate the expression to the right of the
operator, nothing more, nothing less. In this specific case, you
don't even really care about the evaluation, the goal is write
valid (or invalid, as the case may be) syntax that is will be
parsed according to a specific grammar rule that requires some
operator to signal that the thing is an expression and not a Block
Statement.
2017-04-07 11:34:59 -04:00
Daniel Ehrenberg 20536eabe1
Generate tests 2017-04-06 19:44:14 -04:00
Leo Balter 590d04edd2
Add info 2017-04-06 17:50:59 -04:00
Leo Balter 4941d46a28
Update cases for async fns with a line terminator 2017-04-06 16:06:42 -04:00
Shu-yu Guo 5038754462
Test for [no LineTerminator here] after 'async' for arrows and methods 2017-04-06 16:06:42 -04:00
Leo Balter 883db87a51
Generate tests 2017-04-06 15:33:33 -04:00
André Bargull 3291704eb2
Fix multiple test errors
Tests doesn't use async functionality and don't call $DONE, so remove
"async" flag:
- src/params/error/async-gen-named-func-expr.template
- test/language/expressions/async-generator/params-named-dflt-abrupt.js
- test/language/expressions/async-generator/params-named-dflt-ref-later.js
- test/language/expressions/async-generator/params-named-dflt-ref-self.js

Intl.PluralRules.prototype is no longer a Intl.Prototype instance:
- test/intl402/PluralRules/prototype/prototype.js

Intl.PluralRules throws an error when called as a function:
- test/intl402/PluralRules/undefined-newtarget-throws.js

Module namespace objects call OrdinaryDelete for symbol properties:
- test/language/module-code/namespace/internals/delete-non-exported.js

Async generators no longer retrieves "done" property twice:
- src/async-generators/yield-star-async-next.case
- src/async-generators/yield-star-async-return.case
- src/async-generators/yield-star-async-throw.case

Minor units of CLF is 4, so we need to test with maximumFractionDigits=3
to get an error:
- test/intl402/NumberFormat/dft-currency-mnfd-range-check-mxfd.js

DateTimeFormat.prototype.formatToParts length property was changed from
0 to 1:
- test/intl402/DateTimeFormat/prototype/formatToParts/length.js

minimumSignificantDigits and maximumSignificantDigits properties are
only retrieved once:
- test/intl402/NumberFormat/11.1.1_32.js
2017-04-06 15:30:13 -04:00
Leo Balter f48a41caed
Generate tests 2017-04-06 12:36:50 -04:00
Daniel Ehrenberg 6330eccfc4
Add feature flags for various tests 2017-04-06 12:18:03 -04:00
Rick Waldron 818bb8d88f Merge pull request #938 from leobalter/yield-star-abrupt-getiter
Add cases for abrupt completions in yield* in async generator - getIterator
2017-04-06 11:43:29 -04:00
Rick Waldron d7f4f5f664 Merge pull request #937 from leobalter/yield-star
templates for yield star flow
2017-04-06 11:43:21 -04:00
Rick Waldron 7685eeac1f Merge pull request #941 from leobalter/yield-star-next-abrupt
Add cases for abrupt completions in yield* in async generator - next
2017-04-06 11:42:54 -04:00
Rick Waldron 01ce88b588 Merge pull request #922 from leobalter/async-gen-templates-dstr-errors
Add async generator error templates for destructuring binding
2017-04-06 11:42:04 -04:00
Rick Waldron b0e921ff45 Merge pull request #921 from leobalter/async-gen-templates-dstr
Add async generator templates for destructing binding
2017-04-06 11:41:27 -04:00
Leo Balter 70870dc239
Generate tests 2017-03-27 21:44:04 -04:00
Leo Balter 8f0fd88ad9
Generate tests 2017-03-27 20:41:11 -04:00
Leo Balter 088ef77000
Generate tests 2017-03-27 17:19:19 -04:00
Leo Balter 882b3cc0d0 Fix frontmatter tags (#936) 2017-03-27 16:22:59 -04:00
Leonardo Balter 1e74cfe336
Generate tests 2017-03-27 13:32:05 -04:00
Leo Balter 2adebecbfa
Generate tests 2017-03-27 13:21:14 -04:00
Leo Balter 3d7ae07295
Generate tests 2017-03-27 13:07:11 -04:00
Leonardo Balter 8525cdb165
Generate tests 2017-03-27 13:07:09 -04:00
Leonardo Balter 66f42efc99
Generate tests 2017-03-27 13:07:08 -04:00
Leonardo Balter 74b07de387
Generate tests 2017-03-27 13:07:06 -04:00
Leonardo Balter 42d993c45a
Normalize folder async generator expressions 2017-03-27 13:07:05 -04:00
Leonardo Balter 4459447eb7
Generate tests 2017-03-27 13:01:11 -04:00
Leonardo Balter 285888ada1
Generate tests 2017-03-27 12:54:18 -04:00
Leo Balter db9dc643e9
Generate tests 2017-03-27 12:17:57 -04:00
Leonardo Balter 92ac53f210
Generate tests 2017-03-20 14:50:53 -04:00
Leo Balter e45b2ae532 Add tests for computed __proto__ property keys (#916)
Fixes #904
2017-03-16 12:16:27 -04:00
Leo Balter e4bbdba105 Merge pull request #914 from leobalter/850-top-level
Avoid top level name and length bindings
2017-03-14 20:48:48 -04:00
Leonardo Balter 368d483490
Generate tests 2017-03-14 17:42:04 -04:00
Leonardo Balter da22db06d1
Generate tests 2017-03-14 16:30:12 -04:00
Leonardo Balter aa2c69960d
Generate tests 2017-03-14 15:13:10 -04:00
Leonardo Balter 7522a29f31
Generate tests 2017-03-14 14:58:33 -04:00
Leonardo Balter c37a242057
Move tests for params trailing comma to the test gen tool 2017-03-14 14:58:32 -04:00
Leonardo Balter c017b4280b
Generate tests 2017-03-14 13:30:35 -04:00
Rick Waldron b0e9db8856
Remove invalid tests on parameters vs arguments list
Ref #822
2017-03-14 13:20:10 -04:00
Leonardo Balter 340543bc11
Rename top level 'name' and 'length' bindings
Fix 850
2017-03-14 12:43:24 -04:00
Leo Balter 2c1aed0db6 Fix duplicate function declarations (#905)
Fixes #771
2017-03-13 18:43:41 -04:00
Leo Balter 763649d268 Fix runtime error tests previously marked as early errors (#881)
Fixes #877
Ref #872
2017-03-13 11:09:04 -04:00
Leo Balter 6ef9cef4a0 Generate tests for 16e66ece0 (#901) 2017-03-13 11:01:26 -04:00
Leo Balter 471bde9162 Add descriptions for async-iter suspended execution tests (#894)
Fixes #889
2017-03-13 09:59:42 -04:00
Leonardo Balter e54c471809
Generate tests 2017-03-09 10:30:09 -05:00
Leonardo Balter 0cc55bb44d
Generate tests 2017-03-06 16:25:14 -05:00
Leo Balter da3898d707 Merge pull request #884 from jugglinmike/test-generation-indentation
Extend test generation tool
2017-03-06 14:45:40 -05:00
⭐caitp⭐ 4914e47d0b Add tests for Async Generator flow control (#871) 2017-03-06 10:48:13 -05:00
Mike Pennisi f03c2c244c Procedurally generate related tests
Take advantage of a recent extension to the test generation tool in
order to limit duplication.
2017-03-04 12:17:35 -05:00
Kevin Gibbons 975e54de17 Top-level `let undefined` is a runtime error, not an early error. (#872)
The error occurs in [GlobalDeclarationInstantiation](https://tc39.github.io/ecma262/#sec-globaldeclarationinstantiation), which is runtime semantics.
2017-03-02 15:37:22 -05:00
Shu-yu Guo e262dcd021 Test that @@unscopables is looked up once for inc/dec. (#869) 2017-03-02 13:15:56 -05:00
André Bargull 2871a9c8ed Update tests for cyclic module dependencies through export* (#868)
Cyclic dependencies are no longer an error per
https://github.com/tc39/ecma262/pull/783.
2017-03-01 16:59:53 -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
Rick Waldron fdd2fa9b1c Rename $ => $262. Fixes gh-802 (#823)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-03-01 16:34:15 -05:00
Leo Balter 4546006977 Merge pull request #855 from anba/fix-async-sab-class-tests
Change tests for `extends null` and Intl legacy constructor semantics

Ref tc39/ecma262#781
Ref tc39/ecma402#84
2017-03-01 15:56:41 -05:00
Mike Pennisi 37d5f8e5ef
Re-generate tests 2017-03-01 11:38:11 -05:00
Mike Pennisi 228851fbe4
Add tests for accessor names 2017-03-01 11:38:10 -05:00
arai-a d93bee595e Add some tests for execution order for yield* in async generator (#844) 2017-02-27 15:40:19 -08:00
André Bargull 7e94b8b7ac Fix executor arguments validation in Promise subclass test 2017-02-22 18:05:08 +01:00
André Bargull 8a4abc2a00 Replace __proto__ with non-Annex B alternative 2017-02-22 18:04:59 +01:00
André Bargull c16359bc3c Update tests for classes extending null
Per https://github.com/tc39/ecma262/pull/781
2017-02-22 18:04:43 +01:00
Caitlin Potter 098f9ca3de Add tests for try/finally in async functions 2017-02-17 19:29:21 -05:00
André Bargull 204266794c Fix various test issues (#840)
test/annexB/built-ins/Date/prototype/setYear/time-clip.js
test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js
test/built-ins/Date/prototype/setMonth/new-value-time-clip.js
- Don't try to test time-clip at the end points, because this is near
impossible to get right (needs to consider time zone offset, dst, local
mean time because of Africa/Monrovia, etc.).

test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js
test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js
- Wasn't update to expect RangeError

test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js
- Change ClassDeclaration -> ClassExpression to get completion value

test/built-ins/Function/prototype/toString/AsyncFunction.js
- Add missing \n in expected string
- Also fixed in gh-847

test/built-ins/global/global-object.js
- Add 'var' to make test pass in strict-mode

test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js
- This is allowed in sloppy mode when Annex B is implemented

test/language/expressions/async-generators/expression-yield-as-statement.js
- Fix calls to then()

test/language/module-code/namespace/internals/own-property-keys-binding-types.js
test/language/module-code/namespace/internals/own-property-keys-sort.js
- Tests weren't updated after removal of @@iterator from module
namespace objects

test/language/module-code/namespace/internals/set-prototype-of-null.js
- Fix syntax error

test/language/statements/async-function/early-errors-no-async-generator.js
- No longer valid now that async iteration proposal is at stage 3
2017-02-07 11:10:56 -05:00
Caitlin Potter 6391689a6b Add tests for async generator function expressions 2017-01-19 14:50:15 -05:00
Caio Lima c2eacd956e Adding test cases to validate property descriptors on cases of mapped arguments (#815) 2017-01-17 10:27:40 -05:00
Adam Klein 4ff7e4342e Fix test for instantiating a class extending null (#813)
The sameValue assertion should be that the [[Prototype]] is
equal to the class's prototype, not the constructor.
2016-12-28 17:18:19 -08:00
Kevin Gibbons a73221eb8f mark namespace object toStringTag as non-configurable (#811) 2016-12-28 14:16:24 -08:00
Adam Klein b5edd1256c Add test for setting a module namespace object's prototype to null (#805)
The behavior changed from returning false to true in
https://github.com/tc39/ecma262/commit/13906140a
2016-12-28 10:58:15 -08:00
Kevin Gibbons 03453d6098 Remove tests for module namespace iterator (#810) 2016-12-28 10:57:46 -08:00
Kevin Gibbons 3b9953d65c remove last usage of arguments.caller (#812) 2016-12-28 10:54:02 -08:00
Kevin Gibbons fcc9e07265 Add test for extending a constructor with null .prototype (#806) 2016-12-21 01:30:06 -05:00
Kevin Gibbons 3ed2c78600 Avoid writing to top-level vars named "top", for browser compat (#794)
The HTML spec requires browsers define a non-configurable property
of the global (window) object named "top". This makes it
impossible for a browser to successfully run a test in strict mode
if said test attempts to write to a global variable named "top".
2016-11-22 12:02:40 -05:00
Kevin Gibbons c779cba592 Remove tests for arguments.caller (#797) 2016-11-22 11:59:37 -05:00
Michael Ficarra a4a1dd551b fix expected raw value for invalid escape sequences in tagged templates (#800) 2016-11-22 11:45:39 -05:00
Josh Wolfe 4fd91d8904 fix incorrect tests for trailing commas (#787) 2016-11-11 09:44:38 -08:00
dop251 8982c3c3ab Reformat negative tests metadata (#785) 2016-11-11 09:43:36 -08:00
jugglinmike c9569a7e7e Improve coverage for YieldExpression (#681)
* Re-organize coverage for YieldExpression

* Extend test coverge for YieldExpression

* fixup! Extend test coverge for YieldExpression

Remove unused variables
2016-10-24 11:29:56 -07:00
jugglinmike 720c3cc8cc Update for new `eval` restrictions on `super` (#781)
A recent change to the specification [1] introduces parse-time errors
for certain usages of `super` within eval code. Modify all tests that
are affected by this change:

- Update the test bodies to accurately enforce the new semantics
- Rename files to better reflect the section of the specification that
  they enforce
- Update test meta-data
  - Change the `esid` meta-data to reflect the location of the relevant
    specification text
  - Remove the `es6id` meta-data as the behavior is no longer relatable
    to that specification
  - Introduce the `features` meta-data in cases where the test file's
    new location no longer reflects all required language features

[1] "Normative: Clarify rules around super inside eval"
    https://github.com/tc39/ecma262/pull/685
2016-10-24 10:43:44 -07:00
jugglinmike 71e573f7da Add tests for realm interactions (#688)
* Add tests for prototype realm inference

* Add tests for miscellaneous realm concerns

* Add tests for realm of spec-created Errors

In some cases, Error objects produced by the specification are
observable from ECMAScript code. Among these cases, some are further
differentiated in that they occur outside of any built-in function and
may be triggered through syntactic production directly. The current
realm record is commonly interpreted incorrectly under these
circumstances.

Add tests asserting that the expected realm record is used when
constructing such Error objects.

* Add tests for realm use in ArraySpeciesCreate

* Add tests for function realm retrieval

* Add tests for cross-realm behaviors of Symbols

* Add tests for GetValue and PutValue

* Add tests for realm of spec-created Arrays

In some cases, Arrays produced by CreateArrayFromList are observable
from ECMAScript code. Among these cases, two occur outside of any
built-in function and may be triggered through syntactic production
directly. The current realm record is commonly interpreted incorrectly
under these circumstances.

Add tests asserting that the expected realm record is used when
constructing arrays.

* Add test for spec-created object

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for prototype realm inference

* fixup! Add tests for miscellaneous realm concerns
2016-10-24 10:43:17 -07:00
Kevin Gibbons b4c633fc4f Add test for inequality of RegExps created from the same source (#776) 2016-10-20 11:41:31 -07:00
Mike Pennisi ade6d2e384 Remove "NotEarlyError" object
Because expectations regarding error "phase" are now expressed via test
meta-data, the test runner may now enforce this requirement on negative
tests.

Remove the "NotEarlyError" from the project source. This reduces the
amount of domain knowledge required to author tests and lessens the
potential for inconsistencies between tests.
2016-10-19 15:24:22 -04: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
Mike Pennisi 0c29e6de86 Reformat miscellaneous negative tests
The expected errors in these tests cannot be asserted with the
`assert.throws` helper function for various reasons. Re-format their
meta-data according to the latest design in order to more precisely
describe test expectations.
2016-10-19 15:24:19 -04:00
Mike Pennisi 203b234fc0 Reformat negative SyntaxError tests (runtime)
These tests specifically concern error produced from the global scope,
precluding the use of the `assert.throws` helper function.
2016-10-19 15:24:18 -04:00
Mike Pennisi d5a3a962b2 Reformat negative ReferenceError tests 2016-10-19 15:24:18 -04:00
Mike Pennisi 24e774251a Test runtime errors with assertion utility method
Improve test consistency by using the `assert.throws` helper function to
assert runtime exceptions. Remove superfluous code.
2016-10-18 14:36:14 -04:00
Joseph Pecoraro fb61ab44eb Fix incorrect generator syntax (#761) (#762) 2016-10-14 15:58:46 -07:00
jugglinmike b9d6fec9ac Correct name of fixture file (#775)
The file previously named `values-binding-types_.js` is not intended to
be interpreted as a test. Therefor (in accordance with the project's
`INTERPETING.md` file), its name should include `_FIXTURE` as a suffix.
2016-10-14 11:04:47 -07:00
Tim Disney 9d8d8b6920 Add tests to handle revised template literals (#764) 2016-10-03 13:59:53 -07:00
jugglinmike 4ffee35d89 Add tests for surrogate pairs with RegExp atoms (#722) 2016-08-25 13:29:51 -07:00
Michael Ficarra 894bbcc747 add PropertyDefinitionList evaluation order test (#739)
This test is being added because the committee is considering changing
this evaluation order (as discussed at the May 2016 Munich meeting). The
consequences of this spec change will be more clear as a test change
than a simple test addition.
2016-08-12 12:01:43 -04:00
jugglinmike c5cbf4122d Improve coverage for section 9 (#726)
* Assert creation of 'arguments' object

Ensure that the 'arguments' object is created in cases where it is not
required by the body but is required by the parameters.

* Add tests for cases that disable "arguments" map

* Add tests for NewTarget override of bound function

* Add test for properties of exotic String objects
2016-08-05 10:07:02 -07:00
Tom Care 8a6d7a49ee Merge pull request #711 from bocoup/audit2016-section-21-regexp
Improve coverage for section 21: RegExp
2016-08-04 16:22:18 -07:00
Yusuke Suzuki dfd1fb3a97 Fix incorrect value retrieving in module-code test (#741)
Fix language/module-code/namespace/internals/get-own-property-str-found-init.js.
2016-08-04 11:19:36 -04:00
Yusuke Suzuki e2fb909a1d Fix importing filename in module-code/instn-star-err-not-found.js test
Fix the incorrect module filename.
2016-07-30 15:08:26 -04:00
Brian Terlson dbf251586e Add tests for async functions
Closes #479
2016-07-28 15:11:28 -07:00
Jeff Morrison b785fdf942 Tests for trailing commas in function arg lists (#733)
Adds tests for the proposal as described here:
http://jeffmo.github.io/es-trailing-function-commas/
2016-07-28 12:32:03 -07:00
Tom Care 9ec41dfabd Merge pull request #719 from bocoup/audit2016-section-15
Improve coverage for section 15: Scripts and Modules
2016-07-20 14:28:29 -07:00
jugglinmike b9e21138cc Add tests for script interactions (#689)
ECMA262 allows for an arbitrary number of "ScriptJob"s to run in a given realm.
Although there is no standard mechanism for enqueuing these jobs, many
implementations offer this functionality through custom APIs. In those hosts,
the semantics describing script interactions are directly observable.
In order to guarantee conformance to the specification in advance of a
standardized API, Test262 now requires that hosts provide a $.evalScript
function whose behavior is defined in the project's "INTERPRETING.md" file.
Use this host-provided API to ensure that implementations correctly observe the
specification text that dictates script interactions.
(In writing these tests, I noticed some gaps in coverage that are observable
from a single script execution. This patch includes a dedicated commit for
these tests that do not require $.evalScript.)

* Improve coverage of GlobalDeclarationInstantiation

* Add tests for script interactions

Use the host-provied `$.evalScript` method to assert conformance to the
specification text that defines script interactions.

* fixup! Improve coverage of GlobalDeclarationInstantiation
2016-07-19 18:02:05 -07: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 35206ee85b Add test for subclassing bound functions (#720)
The semantics under test have been incorrectly implemented by the
SpiderMonkey engine.
2016-07-11 13:46:03 -07:00
jugglinmike da0a8e33f0 Improve coverage for section 14: Functions and Classes (#717)
* Add tests for early errors in functions

* Improve tests for class accessors

Use the `propertyHelper.js` utility in order to functionally test the
property descriptors of class methods.

* Remove redundant tests

The semantics of an IdentifierReference as a PropertyDefinition within
an object initializer are exhaustively tested by the files in this
directory whose name match the pattern `prop-def-id-*.js`.

Delete the redundant tests in favor of the more descriptively-named and
more exhaustive alternatives.

* Rename tests

* Update test names to be more descriptive

* Add tests for property descriptors of accessors

* Add tests for runtime error during method dfn

* Add test for observable iteration
2016-07-08 18:43:32 -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
jugglinmike 8d78eddcc6 Add test for early error in RegExp literals (#723) 2016-07-08 18:01:35 -07:00
Leo Balter ca7018bc7e Use global values on typeof tests for Number values (#713)
This is a pure miscellaneous change to use global values of NaN and Infinity instead of their namespaced equivalents.
Ref 9ae0567a50 (r69049894)
cc @suwc
2016-07-06 14:41:22 -07:00
Mathias Bynens 3a5a09eba2 Ensure U+180E is no longer considered whitespace
Ref. https://hashseed.blogspot.com/2014/08/in-ecma-262-5.html
Ref. https://github.com/tc39/ecma262/pull/300#issuecomment-181376767
Ref. 9b10d2a597

Fix and add @anba’s U+180E tests
2016-07-06 10:11:32 -04:00
jugglinmike ab4ff914fb Add tests for assignment target validation of new ES2015 forms (#693)
This re-factors some existing Sputnik tests to be more targeted and to use a
pattern that can be generalized to other forms. We could test these all day,
but I've limited myself to forms introduced in ES2015, specifically
YieldExpression and new.target. Note that SpiderMonkey incorrectly throws a
SyntaxError for these.
I thoughtlessly wrote ReferenceError tests for yield = 1 until I realized
that such productions are not actually recognized by the grammar, so the early
errors do not apply. Instead, I've added a negative syntax test for that case.

* Refactor test for valid cover

* Add tests for ValidSimpleAssignmentTarget

Ensure that constructs introduced in ES2015 are disallowed as assignment
targets, with or without a "cover" grammar.

* Add test for grammar precedence of YieldExpression
2016-07-05 15:20:56 -07:00
Leonardo Balter c204c30a54 Remove invalid test from ArrayBuffer subclassing
Fixes gh-696

As pointed in gh-696, the ArrayBuffer ctor won't throw a RangeError when
invoked without arguments.

Instead of fixing the invalid assertion, this commit removes it as the
coverage for subclassing is already satisfied by the use of slice.
2016-07-05 16:29:21 -04:00
Mike Pennisi 14595b47b8 Add tests for restricted grammar productions 2016-07-02 15:46:16 -04:00
Mike Pennisi 24391fb9e8 Add tests for early errors from `super` 2016-07-02 15:46:15 -04:00
jugglinmike e290a337b8 Improve coverage for section 12, "Expression" (#695)
* Add missing test for early error

* Add missing test for WithBaseObject

* Improve coverage for `new.target`

* Add test for deletion of SuperReference

* Add tests for `in` keyword restrictions

* fixup! Improve coverage for `new.target`
2016-07-01 11:23:43 -07:00
Leo Balter e49d2661a8 Improve assertions comparing values to NaN (#690)
The global isNaN is not precise at all, and Number.isNaN is an ES6 feature that makes it preferrable to use assert's sameValue for NaN values, as it handles it internally using the comparison.
2016-07-01 11:22:55 -07:00
Mike Pennisi 2aa8d4838b Add test for LabelledItem and ContinueStatement 2016-06-30 15:24:42 -04:00
Mike Pennisi ce2e421464 Add tests for interpretation of `let` token 2016-06-30 15:24:42 -04:00
Mike Pennisi 7a8e644696 Correct test for `for-in` IterationStatement
This test was intended to assert the semantics of the `for-in`
statement, but it was mistakenly authored to use a `for-of` statement.
Update the statement under test, and improve the testing methodology to
correctly assert the creation of distinct bindings.
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
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 b0072ca1b5 Add tests for early errors in SwithStatement 2016-06-30 15:03:30 -04:00
Mike Pennisi 843d14ec48 Add test for order of operations in "var" stmnt 2016-06-30 15:03:29 -04:00
jugglinmike a3fffa754b Improve coverage for "super" keyword (#687)
* Improve test coverage for `super` keyword

Add tests for SuperCall and SuperProperty, organized together in the
`test/language/expressions/super/` directory. For SuperProperty, include
tests for usage from within Object initializers and class bodies because
a different set of semantics are observable from each context.
2016-06-29 16:45:19 -07:00
Mike Pennisi 4e781091f8 Improve tests for RegExp `lastIndex` property
The prior version of this test asserted only the property's
configurability. It was also limited to the RegExp object as returned
from the RegExp constructor.

Extend the test to verify all values of the property descriptor.
Duplicate these assertions in a separate file dedicated to the RegExp
object as created from a RegExp literal.
2016-06-29 17:29:43 -04:00
Mike Pennisi 9114f815a0 Add test for '^' assertion with 'm' flag
The specification contains an explicit informative NOTE explaining that
the 'm' flag does not effect the behavior of the '^' assertion. Add a
test to verify this.
2016-06-29 17:07:45 -04:00
Mike Pennisi 0ba684e312 Assert SyntaxError with lower bound in escape seq.
ES2015 reads:

> RegExpUnicodeEscapeSequence :: u{ HexDigits }
>
> - It is a Syntax Error if the MV of HexDigits > 1114111.

Use the MV 0x110000 to assert the lower boundary of values which are
expected to produce the SyntaxError.
2016-06-29 12:34:17 -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
Mike Pennisi 418386e33e
Remove redundant tests
These tests have been re-factored to expand coverage of the "default
parameter" language feature and to more closely adhere to this project's
preferred file organization.
2016-06-21 12:22:50 -04:00
Mike Pennisi 655a880852
Add tests for arguments obj with dflt parameters 2016-06-21 12:22:49 -04:00
Mike Pennisi 7e3019e382
Add tests for function length with dflt parameters 2016-06-21 12:22:49 -04:00
Mike Pennisi 7dcccfcca6
Add tests for use of `yield` in default parameters 2016-06-21 12:22:48 -04:00
Mike Pennisi e5f1740411
Generate tests 2016-06-21 12:22:48 -04:00
Mike Pennisi a969e853e7
Generate tests 2016-06-21 12:20:36 -04:00
Mike Pennisi 1e6cbbf7ba
Add test ensuring withEnvironment flag is honored 2016-06-21 12:14:53 -04:00
Mike Pennisi 6a3837fc0f
Add test for abrupt completion from HasBinding
Ensure that when HasBinding of an Object environment record returns an
abrupt completion, that same completion is returned to the runtime.
Update the meta-data of related tests for consistency with this new
test.
2016-06-21 12:14:53 -04:00
Leo Balter 88bc7fe758 Merge pull request #672 from bocoup/spread-coverage
Improve coverage for "spread" operator
2016-06-14 09:47:35 -04:00
Mike Pennisi f91886421d Generate tests 2016-06-11 17:44:14 -04:00