According to sec-identifiers-static-semantics-assignmenttargettype,
`AssignmentTargetType` of `arguments` and `eval` in non-strict mode code is
`simple`.
sec-update-expressions-static-semantics-early-errors mandates early errors for
`UpdateExpression` if `AssignmentTargetType` is `invalid` or `strict`.
Previously, the early error prohibiting duplicate entries in
UniqueFormalParameters was only tested in terms of async functions. In
one case, this was misattributed to UniqeFormalParameters and only
enforced for strict mode code.
Extend coverage to the other function-creating productions which include
UniqueFormalParameters (i.e. method definitions and non-async arrow
functions), and update the existing tests to more accurately describe
the source of the error.
The tests for the parsing of line terminators were expressed using eval.
This made the tests more complex than necessary and also prevented the
tests from providing value to ECMAScript parsers.
Remove the use of eval and instead express the expectations with literal
source text. Rename the files to make each test's purpose more clear.
The tests for the parsing of line terminators were expressed using eval.
This made the tests more complex than necessary and also prevented the
tests from providing value to ECMAScript parsers.
Remove the use of eval and instead express the expectations with literal
source text. Rename the files to make each test's purpose more clear.
The tests for the parsing of line terminators were expressed using eval.
This made the tests more complex than necessary and also prevented the
tests from providing value to ECMAScript parsers.
Remove the use of eval and instead express the expectations with literal
source text. Rename the files to make each test's purpose more clear.
The tests for the parsing of line terminators were expressed using eval.
This made the tests more complex than necessary and also prevented the
tests from providing value to ECMAScript parsers.
Remove the use of eval and instead express the expectations with literal
source text.
The tests for the parsing of line terminators were expressed using eval.
This made the tests more complex than necessary and also prevented the
tests from providing value to ECMAScript parsers.
Remove the use of eval and instead express the expectations with literal
source text.
These files were authored to test the effect of the carriage return
character, but that character was not present in the source text.
Insert the character as intended by the authors.
This makes v8's _monkeyYaml happy --- without it, the info block never ends, and we fail to parse the `features` key.
An explicit indentation marker isn't used because monkeyYaml doesn't supported it, and adding it might slightly slow things down.
Using PyYAML instead was considered, but after trying it, I don't think it looks viable. [simple test cases](https://gist.github.com/caitp/4a59a67f671907c11051a1b7bd5fdaae)
- Changes associated with spec changes (tc39/proposal-string-matchall#41)
- Update spec comments
- Added test verifying error thrown when `regexp[Symbol.matchAll]` is not callable
- Added test verifying `ToString` is called on `receiver`
- `Proxy/getOwnPropertyDescriptor/call-parameters.js`
Fixes a call to `Object.getOwnPropertyDescriptor` without the prop
param. Not actually a huge problem, as the test wasn't depending on
it.
- `Proxy/getOwnPropertyDescriptor/result-type-is-not-object-nor-undefined`
This test asserted that `function() {}` should throw with the
following spec step, which is incorrect, as functions are typed as
`Object` in the spec.
"""
1. If Type(trapResultObj) is neither Object nor Undefined, throw a
TypeError exception.
"""
Migrating all tests to this API is necessary to prevent tests from hanging indefinitely when a SAB is sent to a worker but the code in the worker attempts to create a non-sharable TypedArray (something that is not Int32Array or BigInt64Array). When that scenario occurs, an exception is thrown and the agent worker can no longer communicate with any other threads that control the SAB. If the main thread happens to be spinning in the $262.agent.waitUntil() while loop, it will never meet its termination condition and the test will hang indefinitely.
Because we've defined $262.agent.broadcast(SAB) in https://github.com/tc39/test262/blob/master/INTERPRETING.md, there are host implementations that assume compatibility, which must be maintained.
Migrating all tests to this API is necessary to prevent tests from hanging indefinitely when a SAB is sent to a worker but the code in the worker attempts to create a non-sharable TypedArray (something that is not Int32Array or BigInt64Array). When that scenario occurs, an exception is thrown and the agent worker can no longer communicate with any other threads that control the SAB. If the main thread happens to be spinning in the $262.agent.waitUntil() while loop, it will never meet its termination condition and the test will hang indefinitely.
Because we've defined $262.agent.broadcast(SAB) in https://github.com/tc39/test262/blob/master/INTERPRETING.md, there are host implementations that assume compatibility, which must be maintained.
Increase coverage for the Intl.DateTimeFormat constructor by adding a
test that confirms that ToObject(...) is appropriately called inside the
implementation.
Four tests were documented as asserting the interpretation of line
terminators within multi-line comments, but the source code did not
actually demonstrate this condition.
Introduce new tests that demonstrate the intended functionality and
place them in the correct directory.
Previously, these tests simply compared against an equivalent regular expression pattern by generating a large string containing either all code points up to U+FFFF or U+10FFFF, depending on the `u` flag, and then performing:
str.replace(re, '') === str.replace(otherRe, '');
These two `String#replace` calls can be optimized into a single `RegExp#test` call by following the pattern used in the property escapes tests at https://github.com/mathiasbynens/unicode-property-escapes-tests.
* 'segmenter-v8' of git://github.com/Ms2ger/test262:
Intl.Segmenter: Submit batch of V8 tests for the iterators.
# Conflicts:
# implementation-contributed/v8/intl/segmenter/segment-iterator-ownPropertyDescriptor.js
* AsyncFunction: Add tests ensuring the new 1-tick await behaviour
This commit adds 3 tests ensuring the optimized behaviour of await
(see https://github.com/tc39/ecma262/pull/1250) in the following cases:
- async functions
- yielding from async generator functions
- for-await-of loops
* AsyncFunction: Add tests ensuring the monkey-patched promises behaviour
This commit adds 2 more tests ensuring the optimized behaviour of await
(see tc39/ecma262#1250) in the following cases:
- awaiting on a native promise with monkey-patched "then"
- awaiting on a non-native promise (a "thenable" object)
* AsyncFunction: Add tests ensuring the non-native promises behaviour
This commit adds 1 more tests ensuring the optimized behaviour of await
(see tc39/ecma262#1250) in the following cases:
- awaiting on a non-promise, non-thenable object
It also renames the previous test for non-promise (a "thenable" object)
to distinguish from the new case.
The commit adds checks for proper await/promises interleaving in the
aforementioned cases and includes a small code clean-up.
* AsyncFunction: Refactor tests ensuring the new 1-tick await behaviour
Gather all the tests to their appropriate folder and update copyright header.
The tests for the parsing of compound assignment expressions were
expressed using eval. This made the tests more complex than necessary
and also prevented the tests from providing value to ECMAScript parsers.
Remove the use of eval and instead express the expectations with
literal source text.
- Add cases for mixing module and script code
- Rename test case from return promise to thenable
- Fix script code case with valid loaded fixture
- Add a test to assert a promise return
- Add case for specifier toString rejection
- Add case for specifier toString
- Test Assignment expression abrupt completion
- Test Promise return
This behavior is covered by another test in this directory:
`arguments-strict-single.js`. Although the syntax error happens to occur
within the body of a function expression, this distinction is not
significant enough to warrant the test's presence nor does it motivate
the introduction of many similar negative syntax tests which are
currently unavailable.
The tests for the parsing of variable declarations were expressed using
eval. This made the tests more complex than necessary and also prevented
the tests from providing value to ECMAScript parsers.
Remove the use of eval and instead express the expectations with literal
source text.
The tests for the parsing of `for/in` loops were expressed using eval.
This made the tests more complex than necessary and also prevented the
tests from providing value to ECMAScript parsers.
Remove the use of eval and instead express the expectations with literal
source text. Move the tests to the `for-in` directory to better reflect
the grammar production that they test.
Two tests placed within the "variable" directory do not include a variable
declaration. Because the behavior they assert is covered by an existing
test (test/language/arguments-object/10.5-1gs.js), they may be removed
without reducing coverage.
- Add cases for invalid syntax
- Add valid cases
- nested imports
- add non existent file case
- Fix cases and templates to use a full importcall expr token
- add case for call expression position
- remove unnecessary module flag from templates
- Add templates for nested with
Increase coverage for the Intl.NumberFormat constructor by testing that
passing a string value to the Intl.NumberFormat constructor is
equivalent to passing an Array containing the same string value.