* 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.
* 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
* 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
* 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>