Commit Graph

4055 Commits

Author SHA1 Message Date
rwaldron c94b4ee7e1 fix typo 2021-07-21 09:21:09 -04:00
rwaldron a303e07a12 test: import value, non-existant binding 2021-07-21 09:21:09 -04:00
rwaldron 80f162d174 fix: empty the lint trap 2021-07-21 09:21:09 -04:00
rwaldron 843b1baf7b tests: Realm.prototype.importValue semantics 2021-07-21 09:21:09 -04:00
rwaldron 8b7c610232 tests: Realm.prototype.evaluate validate realm object 2021-07-21 09:21:09 -04:00
rwaldron 4c98d138b9 fix: Realm.prototype.evaluate semantics 2021-07-21 09:21:09 -04:00
rwaldron b2f34c0894 tests: Realm.prototype.evaluate semantics 2021-07-21 09:21:09 -04:00
rwaldron 935d08814e tests: Realm.prototype.evaluate, Realm.prototype.importValue 2021-07-21 09:21:09 -04:00
Linus Groh 0efd2a3baa
Rename all uses of Temporal.now to Temporal.Now (#3069)
See: https://github.com/tc39/proposal-temporal/commit/d0acb66
2021-07-20 15:06:31 -04:00
devsnek 80678e0bed Update identifier-strict-recursive.js 2021-07-20 10:33:29 -04:00
devsnek 2be28ba0c8 add test that delete early error is recursive 2021-07-20 10:33:29 -04:00
Mike Pennisi 3b06fd012a Update test for deletion of SuperProperty
The following proposed change modifies the semantics this test was
originally written to verify:

Normative: Allow null or undefined in Reference Records
https://github.com/tc39/ecma262/pull/2267
2021-07-19 13:28:09 -04:00
Richard Gibson 39026ea655 Add generated tests
Fixes #3039
2021-07-16 09:49:17 -04:00
jugglinmike 8faacdbaee
Add tests: "Extend TimeZoneName Option" proposal (#3042) 2021-07-16 09:45:02 -04:00
jugglinmike a92327395c
Correct errors in SharedArrayBuffer tests (#3040)
* Correct errors in SharedArrayBuffer tests

* fixup! Correct errors in SharedArrayBuffer tests
2021-07-16 09:31:00 -04:00
Timothy Gu 6319cb1e2a Add more static class property ordering tests
Since https://github.com/tc39/ecma262/pull/1490, the "length" and "name"
properties of a class are defined before any static methods. This is
tested by #2057, in test/language/computed-property-names of all places.

At the same time, static methods with "name" as the name would overwrite
the original property, but retain the original property enumeration
order. This was not previously tested. In fact, the overwriting behavior
was not tested at all for the "length" property.

This commit mends both holes in test coverage.
2021-07-16 09:27:16 -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
jugglinmike afe217b318
Add tests for "Class Static Init. Blocks" proposal (#2968)
* Add tests for "Class Static Init. Blocks" proposal

This proposal is currently at "stage 3" in TC39's standardization
process.

* fixup! Add tests for "Class Static Init. Blocks" proposal

* Correct identifier reference

* Update tests for grammar

* Update tests for identifiers

* Add tests for scope derivation
2021-07-15 08:49:12 -04:00
Frank Yung-Fong Tang f1f3a2d542
Add test for 12.4.21 of Temporal (#3036)
* Add test for 12.4.21 of Temporal

12.4.21 Temporal.Calendar.prototype.fields ( fields )
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.fields

@sffc @Ms2ger @ryzokuken @ljharb

* move to the right file

* remove from wrong place
2021-07-13 19:39:07 -04:00
Nicolò Ribaudo 356afd79a8
Fix syntax in `supportedLocalesOf-unicode-extensions-ignored` test (#3035) 2021-07-12 13:13:56 -04:00
Kate Miháliková c27f6a5b9a
Add tests for Intl.DateTimeFormat conflicting options (#3033)
Relates to tc39/proposal-temporal#1590
2021-06-30 11:43:26 -04:00
jugglinmike aaf4402b4c
Add tests for Temporal.now.instant (#3031) 2021-06-29 11:45:42 -04:00
jugglinmike ebb6c34fa5
Resizable ArrayBuffer: TypedArray methods (#3027)
* ResizableArrayBuffer: TypedArray.prototype.set

* Resizable ArrayBuffer: TypedArray methods

The files in this patch are highly similar. Only the test for
`TypedArray.prototype.copyWithin` was written manually. The others were
generated from that test via the following script:

    #!/bin/bash

    set -eu

    names_cb='
    every
    filter
    find
    findIndex
    forEach
    map
    reduce
    reduceRight
    some
    '
    names_num='
    at
    fill
    includes
    indexOf
    join
    lastIndexOf
    slice
    '
    names_none='
    entries
    values
    keys
    reverse
    sort
    toLocaleString
    values
    '

    for name in $(printf "${names_cb} ${names_num} ${names_none}"); do
      lower=$(echo ${name} | tr '[:upper:]' '[:lower:]')
      if echo "$names_cb" | grep -xq $name; then
        value='() => {}'
      elif echo "$names_num" | grep -xq $name; then
        value='0'
      else
        value=''
      fi

      if [[ "${name}" == 'at' ]]; then
        features_addition='TypedArray.prototype.at, '
      else
        features_addition=''
      fi

      sed \
        -e "s/copywithin/${lower}/g" \
        -e "s/copyWithin/${name}/g" \
        -e "s/${name}(.*);/${name}(${value});/g" \
        -e "s/resizable-arraybuffer/${features_addition}resizable-arraybuffer/g" \
        ./test/built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-this-out-of-bounds.js \
        > ./test/built-ins/TypedArray/prototype/${name}/return-abrupt-from-this-out-of-bounds.js
    done
2021-06-25 15:33:36 -04:00
jmdyck 781f10c9de
Append missing pipe character on "info:" lines (#3030) 2021-06-25 14:50:40 -04:00
Rick Waldron fb0a68a2cf
Add missing features: [resizable-arraybuffer] (#3029)
* Add missing features: [resizable-arraybuffer]

* fixup! Add missing features: [resizable-arraybuffer]

Co-authored-by: Mike Pennisi <mike@mikepennisi.com>
2021-06-25 14:01:23 -04:00
Mike Pennisi 802f22bf0e Temporal.now.timeZone: improve coverage 2021-06-25 13:52:57 -04:00
Mike Pennisi 19c5e38118 Temporal.now.timeZone: import tests from proposal 2021-06-25 13:52:01 -04:00
jugglinmike f734c2d547
Resizable ArrayBuffer: TypedArray accessors (#3028)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: TypedArray accessors
2021-06-25 13:38:51 -04:00
jugglinmike 13d7b79e90
Resizable ArrayBuffer: TypedArray constructor (#3026)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: TypedArray constructor
2021-06-25 13:31:05 -04:00
jugglinmike 884ed7f6f8
Resizable ArrayBuffer: SharedArrayBuffer accessors (#3025)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: SharedArrayBuffer accessors

* fixup! Resizable ArrayBuffer: SharedArrayBuffer accessors
2021-06-25 13:30:30 -04:00
jugglinmike a82aeaa391
Resizable ArrayBuffer: SharedArrayBuffer methods (#3024)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: SharedArrayBuffer methods

* fixup! Resizable ArrayBuffer: SharedArrayBuffer methods
2021-06-25 13:29:29 -04:00
jugglinmike 1db1bb8216
Resizable ArrayBuffer: SharedArrayBuffer ctor (#3023)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: SharedArrayBuffer ctor
2021-06-25 13:27:36 -04:00
jugglinmike a7fb08e3d7
Resizable ArrayBuffer: DataView accessors (#3022)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: DataView accessors
2021-06-25 13:26:32 -04:00
jugglinmike 5b31a8a9ba
Resizable ArrayBuffer: DataView methods (#3021)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: DataView methods

The files in this patch are highly similar. Only the test for
`DataView.prototype.getBigInt64` and `DataView.prototype.setBigInt64`
were written manually. The others were generated from those files via
the following script:

    #!/bin/bash

    set -eu

    names='
    BigUint64
    Float32
    Float64
    Int16
    Int32
    Int8
    Uint16
    Uint32
    Uint8
    '

    for name in ${names}; do
      lower=$(echo ${name} | tr '[:upper:]' '[:lower:]')
      if [ ${name} == 'BigUint64' ]; then
        replace_bigints=''
      else
        replace_bigints='-e s/\b\([0-9]\+\)n\b/\1/g'
      fi

      sed \
        -e "s/getbigint64/get${lower}/g" \
        -e "s/getBigInt64/get${name}/g" \
        ${replace_bigints} \
        ./test/built-ins/DataView/prototype/getBigInt64/resizable-buffer.js \
        > ./test/built-ins/DataView/prototype/get${name}/resizable-buffer.js

      sed \
        -e "s/setbigint64/set${lower}/g" \
        -e "s/setBigInt64/set${name}/g" \
        ${replace_bigints} \
        ./test/built-ins/DataView/prototype/setBigInt64/resizable-buffer.js \
        > ./test/built-ins/DataView/prototype/set${name}/resizable-buffer.js
    done
2021-06-25 13:24:00 -04:00
jugglinmike 4da5c800a3
Resizable ArrayBuffer: ArrayBuffer accessors (#3020)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: ArrayBuffer accessors

* fixup! Resizable ArrayBuffer: ArrayBuffer accessors
2021-06-25 13:21:11 -04:00
jugglinmike 93ad86b859
Resizable ArrayBuffer: ArrayBuffer methods (#3019)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: ArrayBuffer methods

* fixup! Resizable ArrayBuffer: ArrayBuffer methods
2021-06-25 13:19:33 -04:00
jugglinmike b3c2d3a88e
Resizable ArrayBuffer: ArrayBuffer constructor (#3018)
* Add "feature" for "Resizable ArrayBuffer" proposal

* Resizable ArrayBuffer: ArrayBuffer constructor
2021-06-25 13:18:42 -04:00
Dan Clark 966c76617e
Add 'import-assertions' feature tag to json modules tests (#3016)
* Add 'import-assertions' feature tag to json modules tests

* Add a couple of others that I missed
2021-06-24 14:13:45 -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
Ujjwal Sharma 26cf753e74
intl402: add output tests for locale-info (#3007)
* intl402: locale-info tests for array output

* fixup! intl402: locale-info tests for array output

* fixup! intl402: locale-info tests for array output
2021-06-24 13:20:47 -04:00
Mike Pennisi 9b4ca4371b Add tests for change in Reference Records
These tests support the following normative change

"Normative: Allow null or undefined in Reference Records"
https://github.com/tc39/ecma262/pull/2267

The tests concerning the `delete` operator increase coverage to verify
behavior which, though related, is not altered by the normative change.
These tests are intended to guard against regressions as engines
implement the new semantics.
2021-06-24 13:16:43 -04:00
Mike Pennisi 93541f09e2 Test sequence during deletion of SuperProperty 2021-06-24 13:15:34 -04:00
Jamie Kyle bad7c0487e
Add tests for Object.hasOwn (#2995)
* Add tests for Object.hasOwn

* Update test/built-ins/Object/hasOwn/length.js

Co-authored-by: Jordan Harband <ljharb@gmail.com>

* Update test/built-ins/Object/hasOwn/name.js

Co-authored-by: Jordan Harband <ljharb@gmail.com>

* Fixup comments for Object.hasOwn

* Add Object.hasOwn descriptor test

* use assert.sameValue with true instead of assert()

* remove extra semicolons

* Remove old $ERROR style tests from hasown

* Fix thrown error type in hasown tests

* Fix incorrect test cases

Co-authored-by: Jordan Harband <ljharb@gmail.com>
2021-06-16 17:35:06 -04:00
Michael Dyck 1b16396c88 Delete duplicate feature-declaration 2021-06-10 12:03:05 -04:00
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
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 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
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
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
Mike Pennisi aca79695ba Add coverage for `Yield` parameter in RHS of `in` 2021-03-06 12:28:45 -05:00
Alexey Shvayka c00087e129 Test Array.prototype.sort called with a primitive 2021-03-02 16:33:02 -05:00
Alexey Shvayka c8daa32e48
Improve object rest/spread with Proxy coverage (#2930)
* Test object spread with Proxy

* Test object spread with non-enumerable keys and Proxy

* Test object rest with excluded keys and Proxy

* Test object rest with non-enumerable keys and Proxy
2021-02-26 16:59:51 -05:00
Gus Caplan 516ca9af39 Update tests for ECMA262 #2216
https://github.com/tc39/ecma262/pull/2216
2021-02-26 11:49:49 -05:00
Ron Buckton 0d922ddc97 Fix lint error 2021-02-25 11:03:39 -05:00
Ron Buckton 64ea2d19e6 rename no-indices-array test 2021-02-25 11:03:39 -05:00
Ron Buckton d66f270313 PR Feedback 2021-02-25 11:03:39 -05:00
Ron Buckton a567e4c819 Updates to regexp-match-indices tests based on d-flag 2021-02-25 11:03:39 -05:00
Ujjwal Sharma f6034ebe9f Add DateTimeFormat tests for OrdinaryHasInstance
Add tests to make sure DateTimeFormat does not call the instanceof
operator and calls OrdinaryHasInstance instead.

Refs: https://github.com/tc39/ecma402/pull/500
2021-02-16 12:20:50 -05:00
Ujjwal Sharma 76ab0187c0 Add NumberFormat tests for OrdinaryHasInstance
Add tests to make sure NumberFormat does not call the instanceof
operator and calls OrdinaryHasInstance instead.

Refs: https://github.com/tc39/ecma402/pull/500
2021-02-16 12:20:50 -05:00
Alexey Shvayka 950d097516 Add Object.freeze test 2021-02-08 15:41:23 -05:00
Alexey Shvayka a4ca510b55 Add Object.seal test 2021-02-08 15:41:23 -05:00
Alexey Shvayka fd6bbbe581 Add Object.freeze tests 2021-02-08 15:40:48 -05:00
Alexey Shvayka 1fd4fb480c Add Object.seal tests 2021-02-08 15:40:48 -05:00
Alexey Shvayka 83ffa3d911 Add Object.preventExtensions tests 2021-02-08 15:40:48 -05:00
Yusuke Suzuki 93a2ba8c28 Fix BigInt TypedArrays tests
1. test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js
It is not updated when a60a67ea88 is landed. This patch fixes it.

2. test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js
After detaching, BigInt64Array/BigUint64Array will produce undefined for indexed access. And
if `filter`'s callback says `true` for these results, we need to store `ToBigInt(undefined)`
to a newly resulted BigInt64Array/BigUint64Array and this will throw an error. But this test
assumed it does not throw. This patch fixed flag so that we do not throw that error while keeping
detached typed arrays tested.
2021-02-03 22:10:52 -05:00
ExE Boss 8f904d8cc8 Set function `length` and `name` in `CreateBuiltinFunction` 2021-01-29 09:45:20 -05:00
jmdyck 11624af8d0
Update "info" field (#2941)
The quoted spec wording changed in ecma262#1694.
2021-01-28 16:03:01 -08:00
Mathias Bynens 79060efc7f Add tests for accessors setting their successor 2021-01-27 09:23:28 -05:00
Mathias Bynens e610e75985 Add tests for accessors setting precedessors 2021-01-27 09:23:28 -05:00
Mathias Bynens 80c18c0ea8 Add tests for accessors popping elements 2021-01-27 09:23:28 -05:00
Mathias Bynens 7733d900b2 Add tests for accessors increasing length 2021-01-27 09:23:28 -05:00
Mathias Bynens b7da7c75ce Rename tests 2021-01-27 09:23:28 -05:00
Mathias Bynens 82f634d7fc Add tests for more precise Array#sort
https://github.com/tc39/ecma262/pull/1585
2021-01-27 09:23:28 -05:00
Oskari Noppa a840b0d093 Shorten a very long filename
A quite popular solution for encrypting files on Linux,
[eCryptfs](https://wiki.archlinux.org/index.php/ECryptfs), can't handle
filenames longer than 143 characters when filename encryption is enabled. It
just so happens that the name of this file was 144 characters long, which makes
pulling the repository to an encrypted folder fail.
2021-01-19 09:06:30 -05:00
Caio Lima f81c2f5422 Adding test case for super access from class field defined as arrow function 2021-01-18 09:41:23 -05:00
Kevin Gibbons 96f1e2713b add tests for `for ( async of` 2021-01-18 09:40:36 -05:00
Yusuke Suzuki df1961f16a Fix formatRangeToParts/date-same-returns-single-date.js and add tests using practically-equal two dates
intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js is using `formatRange` and `format`.
Fix this test to use `formatRangeToParts` and `formatToParts` since it is the intention of this test.

This patch adds additional tests to intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js and
intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js. The new test uses two dates that are practially-equal,
and ensures the implementation uses `format` or `formatToParts` by detecting they are practically-equal.
2021-01-10 20:55:08 -05:00
Felipe Balbontín 6cf3433cf8 Update copyright in formatRange/date-same-returns-single-date.js and formatRangeToParts/date-same-returns-single-date.js 2021-01-03 19:52:18 -05:00
Felipe Balbontín 22cdb74659 Add tests for Intl.DateTimeFormat formatRange(ToParts) to check the behavior when startDate is the same as endDate (tc39/proposal-intl-DateTimeFormat-formatRange#19). 2021-01-03 19:52:18 -05:00
Shu-yu Guo 9ca13b1272 Fix typo in BigIntArray property descriptor test 2020-12-30 16:53:29 -05:00
Frank Yung-Fong Tang b2e9dff281 change cel-gaulish map to xtg 2020-12-21 10:15:14 -05:00
Frank Yung-Fong Tang 7c9480476e Update the test based on v35 of UTS35
see http://unicode.org/reports/tr35/#LocaleId_Canonicalization
@anba
2020-12-21 10:15:14 -05:00
Rick Waldron de091de9f6 Include indexOf(undefined, ...) and lastIndexOf(undefined, ...) 2020-12-16 11:59:56 -05:00
Rick Waldron 167e596a64 Align detached buffer semantics with web reality, R6. Fixes gh-2915 2020-12-16 11:59:56 -05:00
Frank Yung-Fong Tang 483219a596 fix mapping for cel-gaulish 2020-12-16 11:59:06 -05:00
Frank Yung-Fong Tang 0b752efc09 Map "cel-gaulish" to "xtg" 2020-12-16 11:59:06 -05:00
Frank Yung-Fong Tang 4ff1828c5e Update to CLDR 38
see 
https://github.com/unicode-org/cldr/blame/master/common/supplemental/supplementalMetadata.xml#L531
and
http://unicode.org/reports/tr35/#LocaleId_Canonicalization
2020-12-16 11:59:06 -05:00
Frank Yung-Fong Tang 10bbf0030a Change sgn-GR: sgn-GR to sgn-GR: gss per CLDR38
see c640c7b9ac/common/supplemental/supplementalMetadata.xml (L149)
2020-12-16 11:59:06 -05:00
Alexey Shvayka 51666c5315 Improve coverage of mapped arguments' [[DefineOwnProperty]] method 2020-12-11 11:06:51 -05:00
Tom Schuster 734c867ac3 Remove test code between license and front matter
The script that we use for updating SpiderMonkey's copy of test262 doesn't like this.
@rwaldron r?
2020-12-10 09:20:36 -05:00
Sébastien Ros 7376666039 Typo 2020-12-10 09:19:33 -05:00
Vlad c1959a44a6 Math.max/min - each element coerced 2020-12-10 09:19:02 -05:00
Felipe Balbontín c898b68ef6 Update the description of some Intl.DateTimeFormat formatRange(ToParts) tests based on changes introduced in tc39/proposal-intl-DateTimeFormat-formatRange#23 2020-12-10 09:17:00 -05:00
Rick Waldron 3b425c6da3 Coverage: missing tests for Array.prototype.reverse method. Fixes gh-2902 2020-12-02 16:34:44 -05:00
Rick Waldron 96aff62fb2 IntegerIndexedElementSet should always indicate success. Ref: tc39/ecma262/pull/2210 2020-12-02 15:06:36 -05:00
Ross Kirsling 73798cbc61
Fix typos for at/prop-desc tests. (#2908) 2020-11-19 02:32:38 -08:00
Rick Waldron 8051f05354 Improved metadata 2020-11-18 16:44:55 -05:00
Rick Waldron fe5f8192de Fix typo 2020-11-18 16:44:55 -05:00
Rick Waldron b5ccbcb5e4 Coverage: Missing test for function length and parameter destructuring. Closes gh-2895 2020-11-18 16:44:55 -05:00
Rick Waldron 602c828805 Coverage: read-only function expression name. Closes gh-2896 2020-11-18 16:30:13 -05:00
Leo Balter 2e5ff2461b fixup! Fix missing renames for item->at 2020-11-18 15:18:14 -05:00
Leo Balter 65bd4432f9 Fix missing renames for item->at
Ref #2905
2020-11-18 15:18:14 -05:00
Rick Waldron e1bfbbfdc8 Fix: Broken test: language/global-code/decl-lex-configurable-global.js. Closes gh-2897 2020-11-18 14:00:54 -05:00
Ross Kirsling df1bce9c2e Rename item() to at(). 2020-11-18 13:31:11 -05:00
Yusuke Suzuki 36d2d2d348 Fix test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/index-prop-desc.js's value
Since the 0's value is 43, 43 should be populated in a descriptor.
2020-11-13 08:57:15 -05:00
Rick Waldron 1c33fdb0ca Test cases for invalid escape sequences preceding "use strict". Fixes gh-2893 2020-11-04 13:46:04 -05:00
Rick Waldron 3d3c56200b Correction 2020-11-04 13:45:45 -05:00
Rick Waldron 112967c1a9 Lint fixes 2020-11-04 13:45:45 -05:00
Rick Waldron 5c546996ba Align detached buffer semantics with web reality, R5. Fixes gh-2879 2020-11-04 13:45:45 -05:00
Rick Waldron 82f38efbab Features: add "intl-normative-optional" 2020-11-03 14:28:17 -05:00
Yusuke Suzuki 20b11bee0f Add tests for [[Description]] of Intl [[FallbackSymbol]]
If normative optional is implemented and [[FallbackSymbol]] is used, its description should be "IntlLegacyConstructedSymbol"
2020-11-02 12:34:09 -05:00
Rick Waldron 3c58228465 Align detached buffer semantics with web reality, R4. Fixes gh-2879 2020-11-02 12:20:44 -05:00
Rick Waldron 959840a62a Remove unused include 2020-10-29 13:50:08 -04:00
Rick Waldron cef698c374 Rename long test file names 2020-10-29 13:49:25 -04:00
Rick Waldron 224c0ce19e Replace unicode characters that pyyaml cannot read 2020-10-29 13:49:09 -04:00
Rick Waldron a563e3a3f8 Remove template that is generating duplicate tests 2020-10-29 13:48:50 -04:00
Rick Waldron 1af15d5199 Add missing features flags 2020-10-29 13:20:18 -04:00
Rick Waldron 0001489473 Update test/built-ins/TypedArray/prototype/forEach/callbackfn-detachbuffer.js
Co-authored-by: Ross Kirsling <rkirsling@gmail.com>
2020-10-21 20:14:36 -04:00
Rick Waldron a60a67ea88 Align detached buffer semantics with web reality, R3 2020-10-21 20:14:36 -04:00
Rick Waldron d6b342338e arbitrary-module-namespace-names: Assertion correction. Fixes gh-2866 2020-10-19 17:47:40 -04:00
Rick Waldron 7d998a098e Align detached buffer semantics with web reality, R2 2020-10-19 17:41:11 -04:00
Shu-yu Guo 6d49a317ac Add missing includes to some Atomics.waitAsync tests 2020-10-19 17:26:47 -04:00
Rick Waldron fd10123a71 String.prototype.split: rename overlong files. Fixes gh-2865 2020-10-19 10:22:45 -04:00
Rick Waldron 3439564fca Add "☿" export to export-expname_FIXTURE.js. Fixes gh-2866 2020-10-17 09:19:45 -04:00
Rick Waldron f2a8384d4d Align detached buffer semantics with web reality, R1 2020-10-16 20:38:21 -04:00
Rick Waldron 23f30e527a Move $DONOTEVALUATE() calls to correct position 2020-10-16 20:37:40 -04:00
Rick Waldron 487b77eda8 Fix gh-2866 2020-10-16 20:34:32 -04:00
Shu-yu Guo f38e55def4 Add SyntaxError tests for string literal export name 2020-10-16 20:32:10 -04:00
Rick Waldron d9740c1726 Atomics.waitAsync: fix lint 2020-10-14 14:21:04 -04:00
Rick Waldron d8efa93bec Generate tests 2020-10-14 14:20:46 -04:00
Rick Waldron bab4da88e3 Remove erroneous test templates and generated files 2020-10-14 14:20:46 -04:00
Rick Waldron b89c3bf369 Generate tests 2020-10-14 14:01:01 -04:00
Caio Lima 72154b17fc Adding test cases to validate private field access with primitive receivers 2020-10-09 16:36:09 -04:00
Jeff Walden 2cfccb765a Add tests verifying that duplicate variants, in a tag or in the tlang component of a tag, make it structurally invalid. 2020-10-09 16:34:33 -04:00
Rick Waldron 59463a2dd7 Cleanups 2020-10-09 13:46:50 -04:00
Rick Waldron bf900a30b2 Create and assign feature: "align-detached-buffer-semantics-with-web-reality" 2020-10-09 13:46:50 -04:00
Rick Waldron 0bb8fe8aba IntegerIndexedElementGet ( O, index ) 2020-10-09 13:46:50 -04:00
Rick Waldron 5f299199c6 IntegerIndexedElementSet ( O, index, value ) 2020-10-09 13:46:50 -04:00
Rick Waldron 47be1e83e2 [[Delete]] ( P ) 2020-10-09 13:46:50 -04:00
Rick Waldron 9c069a6810 sec-%typedarray%.prototype.slice 2020-10-09 13:46:50 -04:00
Rick Waldron 36c2cd165f WIP: Align detached buffer semantics with web reality
To support https://github.com/tc39/ecma262/pull/2164
2020-10-09 13:46:50 -04:00
devsnek 52cb1d0c98 Add missing feature 2020-10-08 20:13:18 -04:00
Gus Caplan ef1ad4c041 add dup __proto__ in json test 2020-10-08 18:05:00 -04:00
Gus Caplan 6aa8338d23 add feature tags 2020-10-08 18:05:00 -04:00
Gus Caplan 1d31345a70 fixup 2020-10-08 18:05:00 -04:00
Gus Caplan 881c9e3ba5 move __proto__ tests 2020-10-08 18:05:00 -04:00
Gus Caplan 14788fee59 move define/lookup tests 2020-10-08 18:05: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 a6d38ffe9a Correction: add explicit language re: application of Forbidden Extensions, bullet 1 2020-10-07 16:43:31 -04:00
Rick Waldron 20e3101105 Lint fixes 2020-10-06 12:01:34 -04:00
Rick Waldron d576baf73f Info: adds "sec-evaluatenew" step to info for all "not-a-constructor.js" tests. 2020-10-06 12:01:34 -04:00
Rick Waldron 8aacff591c Standardize built-in constructor testing 2020-10-06 12:01:34 -04:00
Rick Waldron 12ed905003 Clean up some existing constructor checks; eliminate duplicate checks 2020-10-06 12:01:34 -04:00
Rick Waldron c644ede430 Built-in function objects that are not identified as constructors must throw a TypeError exception when new'ed. Fixes gh-1739 2020-10-06 12:01:34 -04:00
Rick Waldron ce8ec71c98 Features: add full name for FinalizationRegistry.prototype.cleanupSome. 2020-10-06 12:01:10 -04:00
Frank Yung-Fong Tang 42bf3a9f7a Add the check of collation 2020-10-06 11:05:17 -04:00
Rick Waldron 8a65608dc2 Coverage: Object.seal instances of all built-in constructors, and other built-in values. Fixes gh-2845 2020-10-05 14:38:41 -04:00
Rick Waldron c0b18dfadf Cleanup 2020-10-05 14:38:41 -04:00
Rick Waldron 9d345b6a85 Coverage: Object.seal instances of all built-in constructors. Fixes gh-2845 2020-10-05 14:38:41 -04:00
Rick Waldron d6732b2e28 Object.seal: rename in modern form. 2020-10-05 14:38:41 -04:00
Rick Waldron 32334e52ac Object.seal: fix esids 2020-10-05 14:38:41 -04:00