5829 Commits

Author SHA1 Message Date
Tim Chevalier
4d9f01fcf4 Temporal: Add a test for rounding negative instants 2025-11-04 12:52:31 -08:00
Ron Buckton
134a8eafba
[explicit-resource-management] Add remaining tests specific to await using statement syntax (#4481)
* Add remaining tests specific to await-using statement syntax

* PR feedback and minor fixes due to banning 'await using' in switch case/default

* Additional updates

* Fix comment formatting

* Fix esid

* Fix test implementation

* Fix error type in test
2025-11-04 09:04:25 -08:00
Ron Buckton
b56fb90b56
[explicit-resource-management] Add remaining tests specific to using statement syntax (#4483)
* Add remaining tests specific to using statement syntax

* Fix incorrect test, esid

* Add 'for(using of=' test

* PR feedback and minor fixes due to banning 'using' in switch case/default

* Fix spacing around esid

* Fix test implementation

* Fix error type in test
2025-11-04 08:59:03 -08:00
Philip Chimento
421eebef85 Temporal: Add V8's old Temporal tests to staging
V8 is discarding these tests (which were stale and have not been run for
quite a while) and instead relying on test262 for coverage. I converted
them to test262 format, deleted ones that no longer applied, and removed
Calendar and TimeZone objects from them.

They can live in staging until we figure out whether there's anything
here that isn't already covered in the main tree.

See https://chromium-review.googlesource.com/c/v8/v8/+/7100673
2025-11-03 11:38:21 +01:00
Philip Chimento
6600ea1042 Temporal: Add coverage for another large-subseconds addition bug
Bug observed in the proposal-temporal reference code, caused by improper
implementation of AddTime
(https://tc39.es/proposal-temporal/#sec-temporal-addtime) where the
advice in Step 2 was not followed correctly.

See https://github.com/tc39/proposal-temporal/pull/3173
2025-11-03 11:35:50 +01:00
Philip Chimento
d8c989cc8a Temporal: Consolidate "large-subseconds" and "large-milliseconds" tests
These (from #4619 and #4625) are very similar and I'm also going to add
more cases to them in the next commit.

Also add similar tests to Instant and PlainTime.
2025-11-03 11:35:50 +01:00
Philip Chimento
a9251b7718 Temporal: Add tests for internal representation of Duration
The spec describes the internal representation of Duration as float64-
representable integers. There are a few tricky ways that it is
observable if an implementation does not do this correctly. Here are
some tests for them.
2025-11-03 10:30:08 +01:00
Ben Allen
99aa2c22ec
Add test to verify era aliases for non-gregorian calendars (#4631) 2025-11-03 09:17:23 +00:00
Ben Allen
9adf3c0c2f
Added Intl.Era-monthcode test verifying all calendars supported (#4626)
* Added test verifying all calendars required by Intl.Era-monthcode are supported.
2025-10-31 13:43:53 -07:00
Tim Chevalier
66bf8b8b52
Temporal: Add coverage for adding durations with large subsecond values to a PlainTime (#4625)
* Temporal: Add coverage for adding durations with large subsecond values to a PlainTime

* Add tests for PlainDateTime and ZonedDateTime
2025-10-31 13:36:32 -07:00
Tim Chevalier
678c434dab Temporal: Add tests for correct rounding of epoch milliseconds in toString() 2025-10-31 11:36:50 +01:00
Philip Chimento
18f6ed2627 Add missing quotation mark in assertion message 2025-10-30 17:51:51 +01:00
Philip Chimento
0e496d5808 Minor updates to text in Temporal calendar-wrong-type tests
These were missed in https://github.com/tc39/test262/pull/4415
2025-10-30 17:51:51 +01:00
Philip Chimento
85ae4c0966 Temporal: Add tests for optional properties in property bags
These tests confirm that Temporal-object-like property bags have the
correct default values for their optional properties.

This provides coverage for a V8 bug:
https://issues.chromium.org/issues/446728405
2025-10-30 17:40:54 +01:00
Philip Chimento
e72321987e Temporal: Add tests for serialization of durations with pairs of units
These check that durations with large and small units are properly
serialized.
2025-10-30 16:27:33 +01:00
Tim Chevalier
61d0eb9167
Temporal: Add an overflow test for date addition with maximum year (#4618)
* Temporal: Add an overflow test for date addition with maximum year

* Add tests for other cases

* Fix minimum dates

* Add cases for adding/subtracting the negated duration to the opposite end of the allowed years
2025-10-29 18:04:05 -07:00
Tim Chevalier
759fe87f1c Temporal: Add coverage for adding large microseconds/nanoseconds values
Add coverage for adding unbalanced durations with large microseconds
or nanoseconds values to a PlainDateTime or ZonedDateTime.
2025-10-29 17:30:09 -07:00
Duncan MacGregor
c588df6367
Add coverage for Object.assign with an array target (#4603) 2025-10-29 16:06:50 -04:00
duncan.macgregor
15ab1bd12f Fix and tighten up cross realm %ThrowTypeError% test. 2025-10-29 08:41:22 -07:00
André Bargull
e7ddbfac99
Add test for trailing garbage handling in setFromBase64 (#4605) 2025-10-29 15:38:05 +00:00
Nicolò Ribaudo
ccf301650f
Test a module depending on a non-root node of an async cycle (#4465) 2025-10-28 16:21:27 +00:00
Nicolò Ribaudo
d2940bdbb0 Test that resetting [[ModuleAsyncEvaluationCount]] is unobserbable 2025-10-17 17:47:48 +02:00
Richard Gibson
687cf880eb
Temporal: Add tests for PlainMonthDay.from with month and invalid monthCode (#4597) 2025-10-15 18:56:49 +00:00
Philip Chimento
a6f910b8ab Fix module specifiers
These should be relative paths, starting with "./". Bare specifiers are
not allowed in test262.
2025-10-14 10:19:07 +02:00
Richard Gibson
fd2e09dd55 Add missing includes to test/staging/sm/Math/*.js
Fixes #4588
2025-10-09 14:40:16 +02:00
Nicolò Ribaudo
761dc4687c
Add tests for resolution order of async modules promises (#4591) 2025-10-09 12:25:23 +00:00
Mark S. Miller
ac316607ba
[nonextensible-applies-to-private] Fix bugs (#4590)
Fixes #4587
2025-10-08 15:30:40 +00:00
Sosuke Suzuki
432bc2b863 Add assertions for checking names of resolve and reject 2025-10-06 12:45:03 +02:00
Richard Gibson
06dfddc4eb
Move compareArray into assert.js (#4592) 2025-10-02 16:50:07 -04:00
Ben Noordhuis
2e7412547d Test iterator close behavior of Set methods
Set.prototype.isDisjointFrom and Set.prototype.isSupersetOf should call
return() on the set-like iterator but only when it is not exhausted.

Port of the downstream tests I added in quickjs-ng/quickjs@6167dcb127.
2025-09-30 11:57:20 +02:00
jugglinmike
8a8a7af1b9
Classify tests for the stability of array sorting (#4569)
* Classify tests for the stability of array sorting

These tests were originally introduced via
https://github.com/tc39/test262/pull/1977 &
https://github.com/tc39/test262/pull/2062 and subsequently modified via
https://github.com/tc39/test262/pull/2169.

* fixup! Classify tests for the stability of array sorting
2025-09-25 16:26:49 -04:00
André Bargull
5155b2ad7e Add test case when countBytes in TA.p.slice is set to zero
`countBytes` can be set to zero in step 14.d when resizable array
buffers are used.
2025-09-25 17:49:06 +02:00
André Bargull
b5aac6bc84 String.prototype.toLocale{Lower,Upper}Case validates all locale identifiers 2025-09-25 17:42:28 +02:00
Ben Noordhuis
409001b61b Make iterator sequencing test more explicit
The next() method is not supposed to get called. Per discussion here:
https://github.com/tc39/test262/pull/4326#discussion_r2371763680
2025-09-23 16:25:54 -07:00
Adam Shaw
2f06e0b6b3
Tests for Temporal issue 3141 (#4568)
* tests for Temporal issue 3141

* added test descriptions

* Temporal tests for total/round related to bug 3141

* tweak tests, fix wording

* don't use unnecessary temporalHelpers

* update tests to include Temporal issues 3148 and 3149

* move tests, update descriptions

* rename some other files

* move new Temporal tests into intl-land

* Actually commit ptomato typo change requests
2025-09-23 19:56:43 +00:00
Mark S. Miller
822589b1ef
[nonextensible-applies-to-private] Adding private field to non-extensible object throws (#4577)
* [nonextensible-applies-to-private] Adding private field to non-extensible object throws

* add feature nonextensible-applies-to-private

* extending tests in response to reviewer suggestions

* use const instead of let
2025-09-22 12:58:55 -07:00
Linus Groh
e0d8f66a2b Add missing include to WeakMap.prototype.getOrInsertComputed() test 2025-09-18 13:35:51 -07:00
Philip Chimento
6251b55fc6 Reinstate bug numbers as URLs in frontmatter info
The history of why these tests exist can be useful context for future
consumers of the test suite.
2025-09-17 15:51:37 -07:00
André Bargull
dfe2f39a46 Remove test data for non-exported test 2025-09-17 13:25:21 -07:00
André Bargull
7ec30cc749 Replace SpiderMonkey-specific parseModule in async-functions/async-contains-unicode-escape.js and fix a test bug 2025-09-17 13:25:21 -07:00
André Bargull
d90061929a Replace SpiderMonkey-specific parseModule in expressions/optional-chain-first-expression.js 2025-09-17 13:25:21 -07:00
André Bargull
0ee9b57cba Enable strict mode testing for sm/JSON/parse-with-source.js 2025-09-17 13:25:21 -07:00
André Bargull
15be7166d5 Add missing feature tag for json-parse-with-source 2025-09-17 13:25:21 -07:00
André Bargull
6ed990708f Enable strict mode testing for sm/WeakMap and add missing feature tag 2025-09-17 13:25:21 -07:00
André Bargull
85f840d474 Enable strict mode testing for sm/TypedArray 2025-09-17 13:25:21 -07:00
André Bargull
083c373141 Enable strict mode testing for sm/Temporal 2025-09-17 13:25:20 -07:00
André Bargull
7b41001747 Enable strict mode testing for sm/syntax 2025-09-17 13:25:20 -07:00
André Bargull
d1cac014ab Enable strict mode testing for sm/Symbol 2025-09-17 13:25:20 -07:00
André Bargull
4e85cd06bd Enable strict mode testing for sm/String 2025-09-17 13:25:20 -07:00
André Bargull
eba013851c Enable strict mode testing for sm/strict 2025-09-17 13:25:20 -07:00