diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/TypedArray/prototype/at')
12 files changed, 23 insertions, 14 deletions
diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-argument-tointeger.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-argument-tointeger.js index 0177ff8308..6d876f3ec3 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-argument-tointeger.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-argument-tointeger.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger-invalid.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger-invalid.js index e3f65c143d..2f6c5b24fe 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger-invalid.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger-invalid.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- @@ -24,7 +25,7 @@ testWithTypedArrayConstructors(TA => { assert.throws(TypeError, () => { a.at(Symbol()); - }, '`a.at(Symbol())` throws TypeError'); + }); }); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger.js index 4d604500bb..f8eb8dd7fa 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/index-non-numeric-argument-tointeger.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/length.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/length.js index acd90fd31c..29aa7993b7 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/length.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/length.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- @@ -18,13 +19,11 @@ assert.sameValue( 'The value of `typeof TypedArray.prototype.at` is "function"' ); -assert.sameValue( - TypedArray.prototype.at.length, 1, - 'The value of TypedArray.prototype.at.length is 1' -); - -verifyNotEnumerable(TypedArray.prototype.at, 'length'); -verifyNotWritable(TypedArray.prototype.at, 'length'); -verifyConfigurable(TypedArray.prototype.at, 'length'); +verifyProperty(TypedArray.prototype.at, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/name.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/name.js index fd4fcf2324..436c47a595 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/name.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/name.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/prop-desc.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/prop-desc.js index 946b185db0..dada242916 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/prop-desc.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/prop-desc.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds.js index 1613acdcce..59cd73cd26 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds.js @@ -1,4 +1,4 @@ -// |reftest| shell-option(--enable-arraybuffer-resizable) skip-if(!ArrayBuffer.prototype.resize||!xulRuntime.shell) -- resizable-arraybuffer is not enabled unconditionally, requires shell-options +// |reftest| shell-option(--enable-arraybuffer-resizable) shell-option(--enable-float16array) skip-if(!ArrayBuffer.prototype.resize||!xulRuntime.shell) -- resizable-arraybuffer is not enabled unconditionally, requires shell-options // Copyright (C) 2021 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/return-abrupt-from-this.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/return-abrupt-from-this.js index aaf89b12ef..563a419ad1 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/return-abrupt-from-this.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/return-abrupt-from-this.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- @@ -21,22 +22,22 @@ assert.sameValue( assert.throws(TypeError, () => { TypedArray.prototype.at.call(undefined); -}, '`TypedArray.prototype.at.call(undefined)` throws TypeError'); +}); assert.throws(TypeError, () => { TypedArray.prototype.at.call(null); -}, '`TypedArray.prototype.at.call(null)` throws TypeError'); +}); testWithTypedArrayConstructors(TA => { assert.sameValue(typeof TA.prototype.at, 'function', 'The value of `typeof TA.prototype.at` is "function"'); assert.throws(TypeError, () => { TA.prototype.at.call(undefined); - }, '`TA.prototype.at.call(undefined)` throws TypeError'); + }); assert.throws(TypeError, () => { TA.prototype.at.call(null); - }, '`TA.prototype.at.call(null)` throws TypeError'); + }); }); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-item-relative-index.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-item-relative-index.js index ff4d81fc04..c615b657da 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-item-relative-index.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-item-relative-index.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-item.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-item.js index 77ac1a0317..615c69c4b8 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-item.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-item.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-undefined-for-holes-in-sparse-arrays.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-undefined-for-holes-in-sparse-arrays.js index c4eafb1e10..7b0ddba071 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-undefined-for-holes-in-sparse-arrays.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-undefined-for-holes-in-sparse-arrays.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-undefined-for-out-of-range-index.js b/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-undefined-for-out-of-range-index.js index 8a954e3971..af9af6f6f5 100644 --- a/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-undefined-for-out-of-range-index.js +++ b/js/src/tests/test262/built-ins/TypedArray/prototype/at/returns-undefined-for-out-of-range-index.js @@ -1,3 +1,4 @@ +// |reftest| shell-option(--enable-float16array) // Copyright (C) 2020 Rick Waldron. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- |