Commit Graph

5209 Commits

Author SHA1 Message Date
rwaldron 44aac8eadd CONTRIBUTING.md: remove $ERROR from docs 2021-07-21 15:15:55 -04: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
Mike Pennisi 347b651e95 Improve coverage for Intl Locale Info proposal 2021-07-21 13:43:57 -04: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
rwaldron f5fd1af49f features.txt: callable-boundary-realms 2021-07-21 09:21:09 -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
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
Richard Gibson bf0297c0a4 Fix typo 2021-07-19 13:28:31 -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
rwaldron 991a38932a Fix features.txt order 2021-07-16 10:02:41 -04:00
Richard Gibson 39026ea655 Add generated tests
Fixes #3039
2021-07-16 09:49:17 -04:00
Richard Gibson d9a20dfe34 Add a maintenance file for src/insignificant-input-elements 2021-07-16 09:49:17 -04:00
Richard Gibson 3a69fc75d9 Add a test case for each WhiteSpace/LineTerminator character 2021-07-16 09:49:17 -04:00
Richard Gibson 5b1cfdd2b0 Add template for whitespace-after-regular-expression-literal tests 2021-07-16 09:49:17 -04:00
Richard Gibson a7fed497c6 Make it possible to express test case values as a sequence of code points 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
Richard Gibson d15066ec39
Cleanup generation code (#3041)
* Simplify find_cases

* Improve help text

* Improve YAML-capturing regex

* Use built-in dedenting

* Fix use of built-in dedenting

* Fix use of built-in dedenting for Python 3
2021-07-16 09:39:57 -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
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
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