test262/test/built-ins/TypedArray
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
..
Symbol.species Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
from Lint fixes 2020-10-06 12:01:34 -04:00
of Lint fixes 2020-10-06 12:01:34 -04:00
prototype Resizable ArrayBuffer: TypedArray methods (#3027) 2021-06-25 15:33:36 -04:00
invoked.js Fix length prop tests for the TypedArrays ctors family (#1479) 2018-03-08 09:21:09 -05:00
length.js Fix length prop tests for the TypedArrays ctors family (#1479) 2018-03-08 09:21:09 -05:00
name.js Fix length prop tests for the TypedArrays ctors family (#1479) 2018-03-08 09:21:09 -05:00
prototype.js Fix length prop tests for the TypedArrays ctors family (#1479) 2018-03-08 09:21:09 -05:00