Commit Graph

1838 Commits

Author SHA1 Message Date
Rick Waldron 6230065d07
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/isFinite,isNaN (#3086)
* chore: migrate $ERROR -> throw new Test262Error in test/built-ins/isFinite,isNaN

* Update test/built-ins/isFinite/S15.1.2.5_A2.7.js

Co-authored-by: Leo Balter <leonardo.balter@gmail.com>

* Update test/built-ins/isNaN/S15.1.2.4_A2.7.js

Co-authored-by: Leo Balter <leonardo.balter@gmail.com>

Co-authored-by: Leo Balter <leonardo.balter@gmail.com>
2021-07-21 12:41:06 -07:00
Rick Waldron 1a30a69d12
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/decode*,test/built-ins/encode* (#3080) 2021-07-21 12:37:52 -07:00
Rick Waldron e4c53bef51
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Math (#3088) 2021-07-21 12:10:32 -07:00
Rick Waldron a101757ca1
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/global (#3084) 2021-07-21 12:09:22 -07:00
Rick Waldron 02733c5af4
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Infinity (#3085) 2021-07-21 12:07:41 -07:00
Rick Waldron 0fce065601
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/JSON (#3087) 2021-07-21 11:57:35 -07:00
Rick Waldron a912ae03a5
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Boolean (#3078) 2021-07-21 11:55:36 -07:00
Rick Waldron 1ec7056f38
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Atomics (#3077) 2021-07-21 11:53:58 -07:00
Rick Waldron 99ab8cce08
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Array (#3071) 2021-07-21 11:53:23 -07:00
Leo Balter d19534c3ce Add a few tweaks 2021-07-21 09:21:09 -04:00
Leo Balter b4ff2c76bc Add test for Realm's @@toStringTag 2021-07-21 09:21:09 -04:00
rwaldron c778494922 fix: correction to broken test meta data 2021-07-21 09:21:09 -04:00
rwaldron 45495094e2 fix: updates per review 2021-07-21 09:21:09 -04:00
rwaldron bb0ad134f5 fix: use verifyProperty 2021-07-21 09:21:09 -04:00
rwaldron 29cb47e376 fix: correct capitalization 2021-07-21 09:21:09 -04:00
rwaldron a6b2aecaab fix: use verifyProperty 2021-07-21 09:21:09 -04:00
rwaldron d29fba05f9 fix: add missing newline at end of files, add missing frontmatter 2021-07-21 09:21:09 -04:00
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
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
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
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
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
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
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
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