* Remove duplicate test
The behavior under test is verified by another file in Test262:
test/language/expressions/compound-assignment/S11.13.2_A2.1_T3.3.js
That version is preferable because it does not depend on `eval` and
because it supports both strict and non-strict mode.
* Remove overly-permissive test
By asserting only the presence of an "own" property, this test can be
satisfied from both strict mode code and non-strict mode code.
The following test verifies the presence of the "own" property and the
associated descriptor's values in strict mode:
test/language/arguments-object/10.6-13-c-3-s.js
That subsumes the semantics verified by this test, making it
superfluous. Remove the test.
* Remove overly-permissive test
By asserting only the absence of a syntax error, this test can be
satisfied from both strict mode code and non-strict mode code.
The following test verifies the runtime behavior of accessing the
property in strict mode code:
test/language/arguments-object/10.6-13-c-1-s.js
That subsumes the semantics verified by this test, making it
superfluous. Remove the test.
* Remove duplicate test
The behavior under test is verified by another file in Test262:
test/built-ins/Math/prop-desc.js
That version is preferable because it follows the test suite's
convention for testing property descriptors and because it supports both
strict and non-strict mode.
* Remove duplicate test
The behavior under test is verified by two separate files:
test/language/statements/function/line-terminator-non-strict.js
test/language/statements/function/line-terminator-strict.js
These files differ only in their usage of the `noStrict`/`onlyStrict`
metadata. Because tests are intended to be interpreted in both modes by
default, these can be expressed with a single file that does not limit
the permissible modes.
Prior to this patch, the modified test would pass if no exception was
produced. Use the `assert.throws` utility function to concisely express
the expectation more completely.
Prior to this commit, the descriptors of the constructor properties of
the global object were verified inconsistently, many independent
assertions occured in the same file, and that file test was poorly
located.
Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
Prior to this commit, the descriptors of the function properties of the
global object were verified inconsistently, many independent assertions
occured in the same file, and that file test was poorly located.
Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
Prior to this commit, the enumerability of the value properties of the
global object were only verified in strict mode, the assertions occured
in the same file, and that file test was poorly located.
Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
The modified tests are equally valid in strict mode and outside of
strict mode. Remove the flag which limits their use to only one of these
two contexts. Rename tests using the legacy ES5-based naming scheme to
remove the pattern which designates strict mode.
The `$DETACHBUFFER` function is the preferred mechanism for detaching
array buffers.
Likewise, `verifyNotWritable` is the preferred mechanism for asserting
lack of writability.
The values defined by the referenced files are not used by these tests.
This makes their inclusion superfluous, which needlessly increases the
time to execute the tests and may confuse some readers.
* Rename "Object/proto-from-ctor.js" test
* Add missing "Symbol" features
* Add Intl.Collator test
* Add Intl.DateTimeFormat test
* Add Intl.NumberFormat test
* Add Intl.PluralRules test
* Rename & improve "length" test
* Use verifyProperty in "name" test
* Rename & improve property descriptor test
* Remove duplicated test
https://github.com/tc39/test262/blob/master/test/built-ins/Object/prototype/toString/proxy-array.js
* Rename proxy value test
* Rename & improve String object unwrapping test
* Rename & improve Number object unwrapping test
* Rename & improve Boolean object unwrapping test
* Rename & merge replacer returns undefined tests
* Rename & merge replacer function tests
* Rename replacer array revoked proxy test
* Add cross-realm replacer array revoked proxy test
* Add array proxy replacer test
* Add replacer array keys order test
* Add empty replacer array test
* Add non-finite numbers serialization test
* Add replacer array abrupt completion test
* Add replacer array with duplicates test
* Add replacer array ignores undefined test
* Add replacer array unwraps strings test
* Add replacer array unwraps numbers test
* Rename & merge circular object tests
* Add circular array test
* Rename & merge top-level primitives tests
* Rename string escape tests
* Rename BigInt tests
* Rename & improve function value test
* Add replacer function abrupt test
* Rename & merge wrong space type tests
* Rename float number space test
* Rename & improve Number object space test
* Rename & improve String object space test
* Rename basic numeric space test
* Rename string space slice test
* Add replacer array numbers test
* Add toJSON abrupt completions test
* Add not callable toJSON test
* Add toJSON call arguments test
* Add replacer array wrong types test
* Rename & improve string space test
* Rename & improve replacer wrong type test
* Add built-in object requirements test
* Add basic toJSON result test
* Add abrupt array value test
* Add abrupt object value test
* Rename & merge space number clamp tests
* Add replacer function wrapper test
* Add symbol value test
* Add negative zero value test
* Add replacer function & toJSON test
* Add circular object from toJSON test
* Add circular array from toJSON test
* Add circular object from replacer test
* Add circular array from replacer test
* Add replacer function arguments test
* Split & improve proxy value test
* Split & improve revoked proxy value test
* Move proxies with non-string toStringTag to separate file
* Add coverage for async proxy functions
* Add coverage for built-ins with non-string toStringTag
* Move async proxy function tests to new file
* Add not extensible target test for `deleteProperty`
* Add non-writable descriptor test for `defineProperty`
* Add non-writable descriptor test for `getOwnPropertyDescriptor`
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.
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.