Commit Graph

5135 Commits

Author SHA1 Message Date
Michael Dyck 52e7bfc4b6 "flags" is a top-level key, not a key within "negative" 2021-06-10 12:03:05 -04:00
Michael Dyck 675cad4aa3 Remove leading spaces from "---*/" line 2021-06-10 12:03:05 -04:00
Kartik Kapoor 21f07ead19
Update CONTRIBUTING.md (#3005) 2021-06-10 11:36:04 -04:00
Aaryan Porwal 20a089566e
Update CONTRIBUTING.md (#3004)
Fixed some grammatical issues in the document.
2021-06-10 11:34:28 -04:00
Mike Pennisi e793512b55 Add tests for the "JSON modules" language proposal
https://github.com/tc39/proposal-json-modules

This proposal advanced to Stage 3 of TC39's standardization process on
2021-01-27.
2021-05-28 20:02:59 -04:00
Mike Pennisi 56ca8add7d Update project structure to support non-JS files
This change is in service of forthcoming tests for the "JSON modules"
language proposal [1]. Verifying the semantics of that proposal requires
modules whose source text is not valid ECMAScript; this change updates
the guidelines for contributing and interpreting tests so that such test
material can be handled consistently.

Differentiating JSON files with a distinct file name suffice will assist
consumers which require special handling of such files (e.g. web
browsers).

Change the pattern used to designate "fixture" files so that it may be
applied to files used for JSON modules.

Increment the project version number to alert consumers of this change
in interpreting instructions.

[1] https://github.com/tc39/proposal-json-modules
2021-05-28 20:02:59 -04:00
Linus Groh 10fc95cacb
Don't use function argument destructuring in regExpUtils.js (#3000)
This increases compatibility with less advanced engines that only have
partial support for recent language features like assignment patterns.
2021-05-28 19:47:36 -04:00
Mike Pennisi 1ebd34b53b CI: Do not report test failures as errors
Prior to this patch, the CircleCI continuous integration environment was
configured to report test failures in a negative light, displaying red
cross-marks and reporting that "some checks were not successful" in
commits and GitHub Pull Requests which included them.

The passing/failing status of tests does not influence their
desirability for Test262. (In practice, engines very commonly fail
newly-contributed tests.)

Although these conflicting interpretations does not technically
interfere with the maintainers' ability to merge new contributions, it
does create confusion for many contributors who interpreted the UI as a
rejection of their work.

In addition, this behavior made it impossible to distinguish between the
benign test failures and disruptive infrastructural problems (e.g. the
crashing of engines).

Reconfigure the continuous integration environment to accept passing and
failing tests equally, and to only report a problem when the Test262
project's testing infrastructure behaves unexpectedly.
2021-05-28 18:06:58 -04:00
Mike Pennisi d454b8389b Move some AnnexB tests per proposed spec change
Additionally, update test metadata and introduce two new tests to
complete coverage.

Reference: "Normative: Make B.1.{1,2} normative"
https://github.com/tc39/ecma262/pull/1867
2021-05-21 13:06:41 -04:00
Ujjwal Sharma 5e0fc43c66
Add basic tests for proposal-intl-locale-info (#2987)
* Add basic tests for weekInfo

* Add basic tests for textInfo

* Add basic tests for timeZones

* Add basic tests for numberingSystems

* Add basic tests for hourCycles

* Add basic tests for collations

* Add basic tests for calendars

* Add feature for Intl.Locale-info

* add validation to branding tests for locale-info

Add additional assertion to branding tests for proposal-intl-locale-info
to make sure they don't pass spuriously when the proposal is not
implemented.
2021-05-18 22:40:08 -04:00
jugglinmike 6d353a4436
Remove invalid test (#2990) 2021-05-14 10:33:06 -07:00
jugglinmike 8183e9a629
Add test for TLA DFS invariant (#2989)
This behavior was introduced after the Top-Level Await proposal reached
stage 3: https://github.com/tc39/proposal-top-level-await/pull/159
2021-05-14 12:26:25 -04:00
Mike Pennisi 5ae04619a9 Generate tests 2021-05-14 11:04:29 -04:00
Mike Pennisi 18834b2e19 Add tests for import assertions 2021-05-14 11:04:29 -04:00
jugglinmike 219ad6ff01
Add test for [[Description]] from `Symbol.for` (#2970)
* Add test for [[Description]] from `Symbol.for`

* fixup! Add test for [[Description]] from `Symbol.for`
2021-05-13 21:16:43 -04:00
Mike Pennisi 4f50cbfc77 Remove docs for unused frontmatter key, `timeout`
This metadata was not in use when it was first documented in 2014 [1],
and it has not been referenced since that time. It has never been
referenced by `INTERPRETING.md`.

[1] 5b8879b951
2021-05-11 17:43:23 -04:00
Richard Gibson ffec772910 Improve Intl.Segmenter coverage 2021-05-11 17:40:05 -04:00
Alexey Shvayka 18638f301f Test non-writable descriptor & valid index 2021-05-11 17:39:18 -04:00
Alexey Shvayka 37999534c2 Test non-enumerable descriptor & valid index 2021-05-11 17:39:18 -04:00
Alexey Shvayka ac52cbe371 Test non-configurable descriptor & valid index 2021-05-11 17:39:18 -04:00
Alexey Shvayka ba6fd1d822 Test accessor descriptor & valid index 2021-05-11 17:39:18 -04:00
Alexey Shvayka c623dd288a Test valid descriptor & invalid index 2021-05-11 17:39:18 -04:00
Alexey Shvayka 63ad029d71 Remove spec step from "info" that is no longer correct 2021-05-11 17:39:18 -04:00
Alexey Shvayka f89bd5a29b Fix & improve TypeError cross-realm tests for detached buffer 2021-05-11 17:39:18 -04:00
Alexey Shvayka e1e90abbe9 Test that detached buffer throws TypeError 2021-05-11 17:39:18 -04:00
Alexey Shvayka 88979b5b12 Align [[Value]] ToNumber tests with updated spec 2021-05-11 17:39:18 -04:00
Mike Pennisi fd029d2d52 Increase precision of assertions for Error Cause
Minimize the code provided to the `assert.throws` utility in order to
reduce the possibility of false positives and to improve failure
messages in non-conforming runtimes.
2021-05-11 17:37:15 -04:00
Mike Pennisi 9b622bf093 Remove or relocate misleading tests
These tests were designed to test the built-in "Promise.race Resolve
Element function," but ECMA262 does not describe such a function.

Contrary to the test's description, the function under test is created
by the InstantiateArrowFunctionExpression abstract operation. The
following tests verify most of the details directly (only the function
object's extensibility was not already tested by the existing tests):

- test/language/expressions/arrow-function/name.js
- test/language/expressions/arrow-function/throw-new.js
- test/language/expressions/arrow-function/prototype-rules.js

The definition of the built-in resolving functions is closely related,
but Test262 already includes tests for the corresponding concerns:

- test/built-ins/Promise/resolve-function-extensible.js
- test/built-ins/Promise/resolve-function-name.js
- test/built-ins/Promise/resolve-function-nonconstructor.js
- test/built-ins/Promise/resolve-function-prototype.js

Remove the tests and introduce one additional test to preserve coverage
while improving discoverability.
2021-05-11 17:36:28 -04:00
Stuart Cook 9da1d6119c
Add more tests for `for (async of` edge-cases (#2983) 2021-05-07 16:16:34 -04:00
Stuart Cook c11d6b00bc
Add a test for `for await (async of` (#2982) 2021-05-04 15:05:45 -04:00
Shu-yu Guo 70bc32edab
Give Error cause tests the error-cause feature tag (#2977) 2021-04-23 15:53:14 -07:00
legendecas 3e4e07c836
Add tests for stage 3 proposal error cause (#2965)
* Add tests for error cause

* Correct invocation of Proxy constructor

Co-authored-by: Mike Pennisi <mike@mikepennisi.com>
2021-04-23 14:45:27 -04:00
Alexey Shvayka eca69e2c95 Test internal methods of module namespace objects with indices 2021-04-20 09:59:06 -04:00
Alexey Shvayka ce74c5f52d Test BigInt wrapper object 2021-04-20 09:58:16 -04:00
Alexey Shvayka dcccc418b3 Test Symbol wrapper object 2021-04-20 09:58:16 -04:00
Rick Waldron bd65623af6 Revert "Add valid index prototype chain [[Set]] tests"
This reverts commit cc18d5bb14.
2021-04-20 09:56:22 -04:00
Rick Waldron b90326d9a4 Revert "Add valid index Reflect.set tests"
This reverts commit 20cd505a96.
2021-04-20 09:56:22 -04:00
Rick Waldron 3d77404e4f Revert "Add invalid index prototype chain [[Set]] tests"
This reverts commit 477e6ddffe.
2021-04-20 09:56:22 -04:00
Rick Waldron b110681292 Revert "Add invalid index Reflect.set tests"
This reverts commit a3aa19d2e2.
2021-04-20 09:56:22 -04:00
Alexey Shvayka a3aa19d2e2 Add invalid index Reflect.set tests 2021-04-20 09:55:27 -04:00
Alexey Shvayka 477e6ddffe Add invalid index prototype chain [[Set]] tests 2021-04-20 09:55:27 -04:00
Alexey Shvayka 20cd505a96 Add valid index Reflect.set tests 2021-04-20 09:55:27 -04:00
Alexey Shvayka cc18d5bb14 Add valid index prototype chain [[Set]] tests 2021-04-20 09:55:27 -04:00
Ross Kirsling 0f82225ccc Strengthen sloppy-mode tests for future reserved words. 2021-04-20 09:54:23 -04:00
Mike Pennisi 3addcc4b04 Generate tests 2021-04-20 09:53:57 -04:00
Mike Pennisi b9bc25096b Apply `logical-assignment-operators` feature flag 2021-04-20 09:53:57 -04:00
jugglinmike 61c6f8214b
Add tests for stage 3 proposal "private fields in" (#2963) 2021-04-19 07:50:52 -07:00
Alexey Shvayka 6e61dd7754
Test Array's toString() with non-callable "join" (#2973)
* Test Array's toString() with non-callable "join"

* Remove Array.prototype.join modifications
2021-04-15 20:51:08 -04:00
strager 6888a8df82
Fix typo in private getter/setter tests (#2971)
Several tests for getters and setters claim to check for an early
SyntaxError regarding mixing static and non-static propeties with the
same name. However, the tests trigger another issue: the getters have no
method body; they're missing curlies.

Fix the tests to test only the intended SyntaxError, not unrelated
SyntaxError-s.
2021-04-09 20:13:41 -04:00
Frank Yung-Fong Tang 31126581e7
Change Intl.(ListFormat|DisplayNames|Segmenter) (#2952)
* Change Intl.(ListFormat|DisplayNames|Segmenter)

Sync from ToObject to GetOptionsObject which throw TypeError
while the option is not object

* Add null and false to test
2021-03-08 19:31:26 -08:00