268 Commits

Author SHA1 Message Date
rwaldron
488eb365db chore: migrate $ERROR -> throw new Test262Error in harness/ & test/harness 2021-07-21 15:15:55 -04:00
Frank Yung-Fong Tang
bd03c96b60 porting over the Temporal asserts to temporalHelpers.js
Per suggestion by https://github.com/tc39/test262/pull/3049#discussion_r672675461
2021-07-21 09:10:40 -04:00
jugglinmike
162e8be99f
Add tests for Temporal.now.plainDateTime (#3037)
* Temporal.now.plainDateTime: import tests from prop

* Add required metadata

* Correct invalid test

Ensure the error is thrown due to the invocation of the provided method.
Add a separate test to verify how the method is invoked.

* Remove duplicated assertions

* Improve coverage

* Rewrite test to focus on Calendar parameter

The observable interactions with the "timeZone" parameter are verified
by another test which is named for that purpose.

* Remove non-standard test

This test's title suggests that it was intended to verify the behavior
when the "calendar" parameter was undefined. The expected behavior in
that case depends on the presence of a builtin calendar named
"undefined." Test262 cannot definitively assert the presence or absence
of such a calendar.

In contrast to the title, the test body actually uses the calendar name
"japanese."  Test262 cannot definitively assert the presence or absence
of such a calendar.
2021-07-16 09:25:55 -04:00
Paul Bakker
a6a895db12
Remove usage of rest and default parameters in harness (#3034)
Also see https://github.com/tc39/test262/issues/3032
2021-07-02 09:04:13 -04:00
Frank Yung-Fong Tang
9997a26c7d
Fix tests on {localeMatcher: "lookup"} (#3008)
* Fix test for only {localeMatcher: "lookup"}

The expectation that "sr-Thai-RS" would be returned is only true with the 
9.2.2 BestAvailableLocale ( availableLocales, locale )
https://tc39.es/ecma402/#sec-bestavailablelocale
algorithm used by 9.2.3 LookupMatcher ( availableLocales, requestedLocales )
https://tc39.es/ecma402/#sec-lookupmatcher

The default for localeMatcher is "best fit" but not "lookup" for all Intl objects.

And for 9.2.4 BestFitMatcher ( availableLocales, requestedLocales )
https://tc39.es/ecma402/#sec-bestfitmatcher
It may not match "sr-Thai-RS" for "sr"  and return ["de", "zh-CN"] instead. Therefore, we need to change this test to only test on {localeMatcher: "lookup"}

* Add option to getLocaleSupportInfo

Needed to test different localeMatcher

* only test for "lookup" localeMatcher

* Get the info based on the localeMatcher

* pass in localeMatcher to getLocaleSupportInfo
2021-06-24 13:37:33 -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
Frank Yung-Fong Tang
f9a834c05e Update testIntl.js 2020-12-16 11:59:06 -05:00
Rick Waldron
0e7319c015 atomicsHelper.js: Add $262.agent.setTimeout to defines 2020-10-19 17:48:00 -04:00
Rick Waldron
6d8ab9c35e Coverage: more Atomics.waitAsync tests, fixes, improved messages. 2020-10-08 17:25:45 -04:00
Rick Waldron
04517c7ded Remove erroneous ArrowFunction 2020-10-07 16:43:48 -04:00
Rick Waldron
8aacff591c Standardize built-in constructor testing 2020-10-06 12:01:34 -04:00
Rick Waldron
8250b886b0 Create "Test262Error.thrower" as replacement for "$ERROR". Define $ERROR as Test262Error.thrower 2020-09-16 17:36:54 -04:00
Yusuke Suzuki
e8cdf923ef Property clearing code of RegExp constructor is wrong
This code is setting values to $1 etc., which can be non-writable or accessors.
For example, https://github.com/tc39/proposal-regexp-legacy-features/ is specifying them as accessors, and they should throw an error when
it is done in strict code. We should execute `(/(?:)/).test("");` to clear them.
2020-09-02 15:32:18 -04:00
Alexey Shvayka
9e75c60028 Gracefully handle nullish arguments in harness/compareArray 2020-08-31 15:17:24 -04:00
Richard Gibson
24c6732806 Revert "Improve assert.throws output"
This reverts commit 2f9392f28877f9b55516e261f20c582925e2eb3f.
2020-08-21 15:58:21 -04:00
Richard Gibson
6207a8058a Improve assert.throws output 2020-08-21 15:58:21 -04:00
Richard Gibson
93ff9b7262 Replace incorrect use of $DONOTEVALUATE 2020-08-21 15:58:21 -04:00
Richard Gibson
46e26a99a6 Add requirement distinguishing $DONOTEVALUATE from Test262Error 2020-08-21 15:58:21 -04:00
Gus Caplan
5f99d05c6a native function validator for your consideration 2020-08-04 19:44:31 -04:00
Gus Caplan
156186aee2 New NativeFunction tests 2020-08-04 19:44:31 -04:00
Leo Balter
5a01caed71 Add feature tag for cleanupSome
The WeakRefs proposal advanced to Stage 4 but cleanupSome moved back to a Stage 2 status.
The tests should remain in Test262 for now but this feature flag should help users to
filter tests out.
2020-07-21 16:57:50 -04:00
Leo Balter
2e127ec40e Rename usage of master to main
Ref #2699
2020-07-15 15:47:15 -04:00
Frank Tang
3c89cde3e0 Intl.DisplayNames make type required
Update the tests to the latest version after we make
the type option now required

Spec:
https://tc39.es/proposal-intl-displaynames/

Changes of spec:
https://github.com/tc39/proposal-intl-displaynames/pull/76
https://github.com/tc39/proposal-intl-displaynames/pull/83
2020-07-10 19:19:34 -07:00
Rick Waldron
529cff8ee6 Atomics: corrections 2020-06-24 12:26:41 -04:00
Rick Waldron
7e603ae236 Atomics: fix mispelled harness function name 2020-06-24 12:26:41 -04:00
Rick Waldron
11a1eabcc6 Atomics.load will operate on TA when TA.buffer is not a SharedArrayBuffer 2020-06-24 12:26:41 -04:00
André Bargull
649d0d2c9a Update list of non-algorithmic numbering systems
Per https://github.com/tc39/ecma402/pull/438
2020-06-24 12:11:36 -04:00
Alexey Shvayka
fd90d58f05 Change alphanum to character class
Co-Authored-By: Ross Kirsling <rkirsling@gmail.com>
2020-04-29 17:22:05 -04:00
Alexey Shvayka
d3b3e5e586 Make alphanum a non-capturing group 2020-04-29 17:22:05 -04:00
Alexey Shvayka
4371e3ae36 Remove unnecessary capture group 2020-04-29 17:22:05 -04:00
Alexey Shvayka
af05e8e4f7 Revert "Simplify alphanum regex in testIntl.js"
This reverts commit d57bd9d4bd2009e9d0a5f4fa916f8b4a7fb38a3e.
2020-04-29 17:22:05 -04:00
Ross Kirsling
d57bd9d4bd Simplify alphanum regex in testIntl.js 2020-04-23 10:47:32 -04:00
Rick Waldron
127fa27720 Atomics: remove erroneous argument from getReport() in harness/atomicsHelper.js 2020-04-23 10:32:55 -04:00
Rick Waldron
e9ee3dcd62 Atomics: add setTimeout, getReportAsync & safeBroadcastAsync to harness/atomicsHelper .js 2020-04-23 10:32:55 -04:00
André Bargull
a52517464f Add Unicode and Transformed extension canonicalisation
Generated using the make_intl_data.py script.
2020-04-09 09:20:55 -04:00
André Bargull
1c93566e66 Update language tag mappings to CLDR 36.1
Generated using the make_intl_data.py script.
2020-04-09 09:20:55 -04:00
André Bargull
756ee6a171 Update list of numbering systems 2020-04-09 09:20:55 -04:00
André Bargull
7556d59fe7 Update list of Intl service constructors
Add RelativeTimeFormat, ListFormat, and DisplayNames to the list of Intl
service constructors.
2020-04-09 09:20:55 -04:00
Shu-yu Guo
966fc11862 Migrate FinalizationRegistry tests to per-item callback API 2020-04-01 16:45:40 -04:00
Alexey Shvayka
96cf75770e Harness: properly format negative zero 2020-03-25 12:03:05 -04:00
Alexey Shvayka
ad046ceddd Avoid using Array.isArray directly 2020-03-25 11:59:43 -04:00
Alexey Shvayka
79146e5cf4 Bring back verifyProp param to isWritable 2020-03-23 18:19:01 -04:00
Alexey Shvayka
2abfc8cf9d Remove unused verifyProp paramter from isWritable 2020-03-23 14:49:12 -04:00
Alexey Shvayka
86b94099ad Increase unlikely array length 2020-03-23 14:49:12 -04:00
Alexey Shvayka
17fc10942e Fix isWritable throwing RangeError on Array "length" 2020-03-23 14:49:12 -04:00
Daniel Ehrenberg
c6dd620ad3 Rename FinalizationGroup to FinalizationRegistry
Corresponds to https://github.com/tc39/proposal-weakrefs/pull/183

(Note, this is untested)
2020-02-20 12:13:29 -05:00
Leo Balter
6b66b82d88 Cleanup compareArray and deepEqual assertions, remove assert._formatValue
Fixes #2372
2019-10-09 17:57:10 -04:00
Leo Balter
d49777de27 Whitespace cleanups. CRLF => LF 2019-10-08 20:44:09 -04:00
Mike Pennisi
a9111d7144 lint: add rule to verify use of harness files
Verify that every test file which references a harness file using the
"includes" directive also contains at least one reference to a value
defined in the harness file.

To support this check, extend each harness file with a list of values
which it defines.
2019-09-25 14:00:50 -04:00
jugglinmike
ce2dfd49d1 Correct bug in property helper (#2364)
Allow the property helper to be used to verify the configurability of
the global "Object" property.
2019-09-24 16:05:30 -04:00