Commit Graph

1414 Commits

Author SHA1 Message Date
Leo Balter 8688c4ab79
Fix typo: iterator => iterator (#2394)
Fix #2392
2019-10-07 12:43:23 -04:00
Jordan Harband f3e950e8ed tests for String.prototype.matchAll changes (#2389)
Per https://github.com/tc39/ecma262/pull/1716
2019-10-03 14:47:00 -04:00
Leo Balter e2903e2648
Merge pull request #2366 from bocoup/unnecessary-includes
Remove unnecessary "includes" directives
2019-09-27 16:46:22 -04:00
jugglinmike 87e875f6c9 Correct errors in metadata (#2378)
* Correct typo

* Correct esid
2019-09-27 16:32:52 -04:00
jugglinmike 8953024f1a Remove duplicate tests (#2377)
* 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.
2019-09-27 16:31:44 -04:00
Leo Balter 83d9f750c9
Merge pull request #2376 from bocoup/ud-coverage
Improve coverage
2019-09-27 16:30:13 -04:00
jugglinmike 479ea0ec0b Avoid false positive (#2375)
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.
2019-09-27 16:25:07 -04:00
Mike Pennisi 9cd62ffbd7 Improve coverage: ctor props of the global object
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.
2019-09-27 15:39:10 -04:00
Mike Pennisi 1f079a3525 Improve coverage: func props of the global object
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.
2019-09-27 15:39:10 -04:00
Mike Pennisi f8957be8a7 Improve coverage: value props of the global object
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.
2019-09-27 15:39:10 -04:00
Mike Pennisi f5d60d4192 Improve coverage
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.
2019-09-27 15:39:10 -04:00
Mike Pennisi 1e4e524251 Update tests to use APIs defined by included files
The `$DETACHBUFFER` function is the preferred mechanism for detaching
array buffers.

Likewise, `verifyNotWritable` is the preferred mechanism for asserting
lack of writability.
2019-09-25 13:59:24 -04:00
Mike Pennisi f26c2a11bd Remove unnecessary "includes" directives
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.
2019-09-25 13:59:24 -04:00
Leo Balter 3bfb341203 Fixes after test feedback 2019-09-23 12:26:02 -04:00
Leo Balter 08844700fe Update tests for GC hook, apply async
- Fix incorrect tests for WeakRefs

Ref #2239
Fixes #2260
Fixes #2256
2019-09-23 12:26:02 -04:00
Leo Balter 7134634aa4 Revert "Remove tests based on the $262.gc hook"
This reverts commit d6d37f2f43.
2019-09-23 12:26:02 -04:00
Alexey Shvayka 17685735e1 Add "proto-from-ctor-realm" tests for async functions (#2342)
* Add AsyncFunction test

* Add AsyncGeneratorFunction test
2019-09-20 15:27:32 -03:00
Leo Balter 0fd3cf4d24
Some cleanup follow ups (#2351) 2019-09-18 14:15:53 -03:00
Ron Buckton 1056d8fde9 Add tests for regexp-match-indices (#2309)
* Add tests for regexp-match-indices

* Add tests for unicode matches based on presence of /u flag

* Added deepEqual helper, PR feedback
2019-09-18 13:39:12 -03:00
Alexey Shvayka 256f5f4b46 Improve Proxy/set call parameters coverage (#2347)
* Tweak front matter of basic test

* Simplify basic test

* Add test for proxy as prototype

* Add test for proxy as prototype and __proto__
2019-09-18 13:30:28 -03:00
Alexey Shvayka ff83fb2922 Improve "proto-from-ctor-realm" coverage for Array (#2340)
* Rename "Array/proto-from-ctor-realm.js" test

* Add single argument test

* Add two arguments test
2019-09-18 13:26:40 -03:00
Alexey Shvayka ef7fd2bc27 Add "proto-from-ctor-realm" tests for Intl constructors (#2334)
* 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
2019-09-11 17:22:21 -03:00
Alexey Shvayka 652cfc764a Add "proto-from-ctor-realm" tests for native errors (#2335)
* Add EvalError test

* Add RangeError test

* Add ReferenceError test

* Add SyntaxError test

* Add TypeError test

* Add URIError test
2019-09-11 17:19:58 -03:00
Leo Balter d6d37f2f43 Remove tests based on the $262.gc hook
Fixes #2239
Closes #2329
2019-09-05 19:38:03 +01:00
Leo Balter 5d84854f27
Avoid usage of Object.keys when asserting order of returned values (#2320)
Fixes #2226
2019-09-04 11:38:18 -03:00
Gus Caplan 841b32c6da fix TypedArray.prototype.sort test (#2326)
* fix TypedArray.prototype.sort test

* Update sorted-values.js

* Update sorted-values.js
2019-09-04 11:36:51 -03:00
Leo Balter 71e40aad50
Fix circular tests for JSON.stringify (#2315)
Ref #2168
2019-08-28 17:37:19 -03:00
Alexey Shvayka d0b5137c15 Improve JSON.stringify coverage (#2168)
* 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
2019-08-28 17:34:59 -03:00
Leo Balter 1c2bd105fb
Remove shared-nonint-views.js files (#2314)
Ref #2103
2019-08-28 16:23:07 -03:00
André Bargull e48bf299a6 Ensure Atomics functions validate the TypedArray type before coercing the other arguments (#2103) 2019-08-28 16:19:22 -03:00
Caio Lima fbbab61b4a Adding cases to check if SyntaxError is thrown if AllPrivateIdentifiersValid returns false. (#2301) 2019-08-28 14:58:43 -03:00
Alexey Shvayka 8042c57d9b Add Promise#finally invoked on thenable test (#2312)
* Rename proxy context test

* Add thenable context test
2019-08-28 12:42:24 -03:00
André Bargull 59a1a016b7 Assign "name" property to all anonymous functions (#2299)
Implements the changes from <https://github.com/tc39/ecma262/pull/1490>.
2019-08-15 10:58:40 -04:00
Kubilay Kahveci 9b29709797 Add tests for .toString() of private methods (#2268) 2019-08-05 16:47:19 -04:00
Leo Balter ff9763729d Remove duplicated es[56]id if esid is present 2019-08-05 10:54:37 -04:00
Gus Caplan 2fb39cb4e9 add missing feature (#2250) 2019-07-22 12:46:59 -04:00
André Bargull d8c20b423b Call $DONE function exactly once per test
Also make a note in CONTRIBUTING.md that `$DONE` shouldn't be called multiple times.
2019-07-22 02:12:24 -07:00
Caio Lima 1dc78879d4 Add edge tests to verify BigInt to Number conversion when BigInt can't directly be represented by a Number. 2019-07-19 13:53:01 -04:00
Leo Balter d02fe7db38
Add coverage for non object values of the Properties arg of Object.create (#2238)
Fixes #2237
2019-07-15 16:17:03 -04:00
Leo Balter 6cb0a531af Fix typos 2019-07-11 11:17:30 -04:00
Leo Balter b45bf4b6fa fixup! Some edgy cases for weakrefs/finalizationgroups 2019-07-11 11:17:30 -04:00
Leo Balter 3c293f0e6c Some edgy cases for weakrefs/finalizationgroups 2019-07-11 11:17:30 -04:00
Alexey Shvayka 19b5a5a635 Improve Object#toString coverage (#2202)
* 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
2019-07-10 14:00:04 -04:00
Leo Balter 1ef21eb50b fixup! Cleanup some tests for FinalizationGroup 2019-07-02 10:04:04 -04:00
Leo Balter 6242304cd0 Cleanup some tests for FinalizationGroup 2019-07-02 10:04:04 -04:00
Timothy Gu 9dfb9e14e0 Fix WeakMap/WeakSet typo
The test tries to test against WeakSet, but used WeakMap instead.
2019-07-02 09:37:46 -04:00
Alexey Shvayka d7c95efe66 Improve "name" tests of Promise built-in functions (#2179) 2019-06-26 15:03:14 -04:00
Leo Balter 7c7d3f756c Fix tests for FinalizationGroup 2019-06-26 13:49:08 -04:00
Leo Balter f7f07a9010 Add a test for FinalizationGroupCleanupIteratorPrototype 2019-06-21 20:00:35 -04:00
Gus Caplan 61ccff550e Fix invoke-resolve-get-error-close tests (#2210) 2019-06-21 14:26:57 -04:00
Gus Caplan 7a1da555a5 add WeakRef feature to WeakRef/constructor test. (#2209) 2019-06-21 13:41:28 -04:00
Leo Balter f7591eb01b fixup 2019-06-21 11:50:22 -04:00
Leo Balter 73f80aea4d Apply review feedback 2019-06-21 11:50:22 -04:00
Leo Balter ca11ac4a43 Add tests for cleanupSome 2019-06-21 11:50:22 -04:00
Leo Balter dcac20d8ed Add tests for FG register/unregister 2019-06-21 11:50:22 -04:00
Leo Balter ab38ce4e84 Add more tests, include deref 2019-06-21 11:50:22 -04:00
Leo Balter c2c81409b2 fixup! Normative optional WeakRef#constructor 2019-06-21 11:50:22 -04:00
Leo Balter 5fabef83dc Normative optional WeakRef#constructor 2019-06-21 11:50:22 -04:00
Leo Balter 16e9389b01 fix typo 2019-06-21 11:50:22 -04:00
Leo Balter 62477ea0c9 More tests 2019-06-21 11:50:22 -04:00
Leo Balter e3d87d6690 No ctor for WeakRef.prototype 2019-06-21 11:50:22 -04:00
Leo Balter 969d4e68b4 Basic tests for weakref and finalizationgroup 2019-06-21 11:50:22 -04:00
Alexey Shvayka df1a1c75b7 Remove trailing spaces from YAML blocks (#2201) 2019-06-19 16:39:21 -04:00
Gus Caplan ceaebf7058 fix built-ins/Object/subclass-object-arg (#2200) 2019-06-19 15:48:53 -04:00
Alexey Shvayka 395401cba0 Slightly improve JSON.parse coverage (#2196) 2019-06-12 15:29:04 -04:00
Alexey Shvayka 8984ea8080 Add "proxy-missing-checks" feature tag (#2195) 2019-06-12 15:00:18 -04:00
Alexey Shvayka 74e0cae407 Add Date.prototype.toJSON coverage (#2190) 2019-06-12 14:59:54 -04:00
Alexey Shvayka 430ee14d90 Add Object subclass test (#2177) 2019-06-12 14:11:16 -04:00
Aleksey Shvayka 1265a60017 Improve Proxy/construct coverage (#2159) 2019-05-29 15:49:41 -04:00
Aleksey Shvayka 2ce56a5f64 Verify that symbols are not callable (#2180) 2019-05-27 10:34:05 -04:00
Aleksey Shvayka 6f4c0d96f7 Improve GetFunctionRealm coverage (#2155)
* Fix Function.prototype.bind test

* Simplify Proxy test

* Info tweaks

* Add Function.prototype.bind recursive test

* Add Proxy recursive test
2019-05-22 18:11:49 -04:00
Aleksey Shvayka e4fed70c9b Fix description of Promise constructor test (#2174) 2019-05-22 17:57:45 -04:00
Aleksey Shvayka 4838fc3167 Improve String#toString and String#valueOf coverage (#2160)
* toString: rename "length" test

* toString: use verifyProperty in "name" test

* toString: rename & merge non-generic tests

* toString: add cross-realm non-generic test

* toString: rename happy path tests

* valueOf: use verifyProperty in "length" test

* valueOf: use verifyProperty in "name" test

* valueOf: rename & merge non-generic tests

* valueOf: add cross-realm non-generic test

* valueOf: rename happy path tests

* toString: add indirect invocation tests

* valueOf: add indirect invocation tests
2019-05-22 17:47:15 -04:00
Aleksey Shvayka ee960aefb5 Improve Promise constructor coverage (#2158)
* Add constructor descriptor test

* Rename & improve non-callable executor test

* Rename & simplify executor call context tests

* Remove duplicate reject via abrupt test

* Deduplicate undefined NewTarget tests

* Add basic constructor test

* Add abrupt prototype getting tests
2019-05-22 17:33:09 -04:00
Mathias Bynens a9abd418cc Update RegExp property escape tests per Unicode v12.1.0 (#2161)
Ref. https://github.com/tc39/ecma262/issues/1530.
2019-05-22 17:08:14 -04:00
Mathias Bynens 1c30aef38d Move TypedArray#sort stability test to correct directory (#2169)
Follow-up to #2062.
2019-05-20 11:35:59 -04:00
Leo Balter 0c67d0f1b7
Merge pull request #2163 from shvaikalesh/function-apply
Improve Function#apply coverage
2019-05-15 14:43:16 -04:00
Aleksey Shvayka 5a725fe122 Expect TypeError from correct realm 2019-05-15 21:29:11 +03:00
Aleksey Shvayka 993601089b Add Array property descriptor test (#2164) 2019-05-15 12:33:52 -04:00
Aleksey Shvayka b6cc89c61d Add abrupt completion tests 2019-05-15 03:28:33 +03:00
Aleksey Shvayka 8551382805 Add cross-realm "this not callable" test 2019-05-15 01:37:52 +03:00
Aleksey Shvayka 385848d449 Rename & merge "this not callable" tests 2019-05-15 01:36:22 +03:00
Aleksey Shvayka 9c93e05d90 Unify "length" tests 2019-05-15 00:01:29 +03:00
Aleksey Shvayka 6943b289fc Add cross-realm "argArray not object" test 2019-05-14 23:07:27 +03:00
Aleksey Shvayka 171b3ef083 Rename & merge "argArray not object" tests 2019-05-14 23:07:23 +03:00
Aleksey Shvayka 8c1819484e Improve Proxy/apply coverage (#2156) 2019-05-10 15:57:40 -04:00
Aleksey Shvayka 4d33170d0e Add tests for Proxy semantics change (#2143)
* Add not extensible target test for `deleteProperty`

* Add non-writable descriptor test for `defineProperty`

* Add non-writable descriptor test for `getOwnPropertyDescriptor`
2019-05-03 10:21:48 -04:00
Leo Balter 3b2ad0b5d0 Fix tests for new resolve lookup in Promise.allSettled 2019-04-24 17:28:01 -04:00
Leo Balter 24d1b6d59c Fix tests for new resolve lookup 2019-04-24 17:28:01 -04:00
Leo Balter b646cf6365 Add tests for Promise.all|race resolve lookup
Ref tc39/ecma262#1506
2019-04-24 17:28:01 -04:00
Leo Balter f4e60b8f20
Add a case for non extensible targets of proxies GetPrototypeOf (#2122) 2019-04-24 11:49:43 -04:00
Leo Balter 7e7b9e103d
Port tests from Promise.all to Promise.allSettled (#2124) 2019-04-17 14:17:54 -04:00
ta7sudan 4bacf25f0d Add test that a Proxy instance with getPrototypeOf trap use instanceof operator on a function (#2107) 2019-04-03 14:14:51 -04:00
Richard Gibson d62318319f Add tests for string representations of Date objects with negative years (#2114)
* Add tests for string representations of Date objects with negative years

Ref https://github.com/tc39/ecma262/issues/1035
Ref https://github.com/tc39/ecma262/issues/1407
2019-04-02 14:02:35 -04:00
Mathias Bynens 9339f8a5ce Update RegExp Unicode property escape tests per Unicode 12 (#2091)
1cfedb79bb
https://github.com/tc39/ecma262/issues/1467
https://github.com/tc39/ecma262/pull/1468
2019-03-12 04:47:27 -04:00
Leo Balter 262216ed5b Remove other leading empty lines in info blocks 2019-02-25 16:14:22 -05:00
Robin Templeton efa414ae00 Add tests for calling BigInt functions with fewer arguments than required (#2075) 2019-02-19 13:25:25 -05:00
Andy Wingo 298ad6907b Add new test for receiver of toJSON on bigint values (#2079)
Spec link:

  https://tc39.github.io/proposal-bigint/#sec-serializejsonproperty

Thanks to André Bargull for the test:

  https://bugzilla.mozilla.org/show_bug.cgi?id=1528784
2019-02-19 13:23:41 -05:00
Mike Pennisi cc09757478 Test forward slash in RegularExpressionClassChar 2019-02-14 15:21:42 -05:00
Jake Champion b4cf5de2e8 Fixed typo, `now` should be `no` (#2061) 2019-02-04 11:59:15 -07:00
Mathias Bynens 9280e1f872 Add tests for %TypedArray%.prototype.sort stability (#2062)
https://github.com/tc39/ecma262/pull/1433
2019-02-04 11:58:05 -07:00
Michael Ficarra 7238135940 add flat/flatMap to Array unscopables 2019-01-30 10:02:35 -05:00
Timothy Gu 5d39cad767 Add tests for roundTiesToEven rounding in Math.fround (#2021) 2019-01-28 11:33:14 -05:00
Peter Wong 08d827565b Increase coverage for %TypedArray%.prototype.map with species constructor (#2019) 2019-01-07 12:34:35 -02:00
Ross Kirsling d0f57bff72 Ensure test file YAML blocks don't have a trailing space. (#2018) 2019-01-07 11:40:39 -02:00
Leo Balter e403eea331 Fix false positives 2018-12-21 10:50:23 -05:00
Leo Balter 7375dcb080 Remove duplicates 2018-12-21 10:50:23 -05:00
Leo Balter 258da539bc refactor coverage for flatMap 2018-12-20 13:08:21 -05:00
Leo Balter 46c557247e Fix more false positives throwing TypeError in functions 2018-12-17 16:45:56 -05:00
Peter Marshall b3efcd2f3f Consistently use spaces in features lists (#2000) 2018-12-17 17:00:04 -02:00
⭐caitp⭐ 16ef6ad10d Get rid of the leading empty line in info block (#1993)
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)
2018-12-15 05:40:37 -05:00
Peter Wong c36bdcfeb3 Update tests for String.prototype.matchAll (#1990)
- 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`
2018-12-10 10:53:01 -05:00
Mathias Bynens b2597d060d Add tests for Array.prototype.sort stability (#1977)
https://github.com/tc39/ecma262/pull/1340
2018-12-06 11:56:58 -05:00
André Bargull b62dae4fff Fix various bugs in test cases (#1988) 2018-12-05 15:48:28 -05:00
Rick Waldron 86deb370e7 Eliminate false positives: BigInt64Array, BigUint64Array 2018-11-30 11:37:28 -05:00
Rick Waldron 6e836cea56 Eliminate false positives: BigInt 2018-11-30 11:34:13 -05:00
Rick Waldron d98f3f4d63 Eliminate false positives: String.prototype.trimEnd, String.prototype.trimStart 2018-11-30 09:37:16 -05:00
Rick Waldron 6d2288fe79 Eliminate false positives: Promise.prototype.finally 2018-11-30 09:34:25 -05:00
Rick Waldron 628faa5e06 Eliminate false positives: Object.fromEntries 2018-11-30 09:31:54 -05:00
Rick Waldron 2e18327af2 Eliminate false positives: Array.prototype.flat, Array.prototype.flatMap 2018-11-30 09:27:07 -05:00
Gus Caplan 1df8797a6b add WeakSet to feature list where its used in Set tests 2018-11-28 10:26:57 -05:00
Gus Caplan 2aacb28bb9 Fix some proxy tests (#1966)
- `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.
  """
2018-11-26 13:41:13 -05:00
Rick Waldron e91645c812 Atomics: (bigint) initialize BigInt64Array before calling $262.agent.start(string-of-program-code) 2018-11-20 15:57:39 -05:00
Rick Waldron 8793bf5d57 Atomics: fix running index in notify-with-no-matching-agents-waiting.js
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.
2018-11-20 15:18:14 -05:00
Rick Waldron e4883091b9 Introduce $262.agent.safeBroadcast and migrate Atomics tests.
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.
2018-11-20 15:17:47 -05:00
Leo Balter dec4e5df74
Merge pull request #1801 from mathiasbynens/issue-1634
Move `throw "…"` for negative parsing errors to a helper function
2018-11-13 17:23:09 -05:00
Kevin Gibbons 8ed9947df1 add async-iteration flag (#1942) 2018-11-08 15:32:40 -05:00
Rick Waldron 87202773fd
Merge pull request #1938 from adrianheine/promise
Add missing mandatory Promise.{all,race} argument
2018-11-08 09:32:25 -05:00
Rick Waldron b1e15cd326
Merge pull request #1923 from bakkot/less-regex-eval
Reduce uses of `eval` for regex literal syntax
2018-11-08 09:18:48 -05:00
Adrian Heine fc6de76a0d Add missing mandatory Promise.{all,race} argument 2018-11-08 09:37:56 +01:00
Adrian Heine né Lang 0475c127c4 Fix some generators feature flags (#1933) 2018-11-07 17:51:23 -05:00
Kevin Gibbons 0160cab518 fix missing/duplicate tests 2018-11-07 13:52:44 -08:00
Mathias Bynens e558b29b69
Optimize character class escape tests
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.
2018-11-06 16:14:14 -08:00
Mathias Bynens 01550ab13a
Sync with https://github.com/bocoup/test262-regexp-generator/pull/1 2018-11-06 15:24:07 -08:00
Kevin Gibbons e80d8a184a split unicode-property-names.js 2018-11-05 15:34:03 -08:00
Kevin Gibbons 9bc9116656 split unicode-malformed.js 2018-11-05 15:23:03 -08:00
Kevin Gibbons 296f47a008 split non-unicode-property-names.js 2018-11-05 15:12:23 -08:00
Kevin Gibbons de339e98d6 split non-unicode-malformed.js 2018-11-05 14:58:03 -08:00
Richard Gibson 5b3d429e28 Move cross-realm tests into their own files 2018-11-02 14:39:23 -04:00
Richard Gibson 6da621f161 Assert error when invoking any %RegExpPrototype%-aware getter on cross-realm RegExp.prototype 2018-11-02 14:39:23 -04:00
Richard Gibson 9e0410814a Test cross-realm use of RegExp source getter in both directions 2018-11-02 14:39:23 -04:00
Richard Gibson 823af01575 Assert error when invoking RegExp source getter on cross-realm RegExp.prototype
RegExp.prototype is not a RegExp, and the algorithm only special-cases
(same-realm) %RegExpPrototype%.
2018-11-02 14:39:23 -04:00
Rick Waldron f1e362d558 Fix typos; generate tests (#1907) 2018-10-26 17:11:05 -04:00
Mathias Bynens b9daa57dcb Rename to $DONOTEVALUATE per @leobalter's suggestion 2018-10-23 13:51:17 +02:00
Mathias Bynens e3feffb01e Move `throw "…"` for negative parsing errors to a helper function
Closes #1634.
2018-10-23 13:51:16 +02:00
André Bargull faed4fb089 Fix various test issues 2018-10-17 07:45:33 -07:00
Richard Gibson e064fcd7ce Remove redundant JSON test 2018-10-03 11:06:32 -04:00
Richard Gibson 58e308753c Fix grammar in JSON.stringify tests 2018-10-03 11:06:32 -04:00
Richard Gibson d961fcc905 Add feature for well-formed-stringify tests 2018-10-03 11:06:32 -04:00
Richard Gibson ce967f7a86 Add tests for proposal-well-formed-stringify
* unpaired surrogate escape sequences
2018-10-03 11:06:32 -04:00