diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype')
6 files changed, 85 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/BYTES_PER_ELEMENT.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/BYTES_PER_ELEMENT.js new file mode 100644 index 0000000000..ebb9c9555b --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/BYTES_PER_ELEMENT.js @@ -0,0 +1,23 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-typedarray.prototype.bytes_per_element +description: > + The initial value of Uint16Array.prototype.BYTES_PER_ELEMENT is 2. +info: | + The value of TypedArray.prototype.BYTES_PER_ELEMENT is the Number value + of the Element Size value specified in Table 49 for TypedArray. + + This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }. +includes: [propertyHelper.js] +features: [TypedArray] +---*/ + +assert.sameValue(Uint16Array.prototype.BYTES_PER_ELEMENT, 2); + +verifyNotEnumerable(Uint16Array.prototype, "BYTES_PER_ELEMENT"); +verifyNotWritable(Uint16Array.prototype, "BYTES_PER_ELEMENT"); +verifyNotConfigurable(Uint16Array.prototype, "BYTES_PER_ELEMENT"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/browser.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/browser.js diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/constructor.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/constructor.js new file mode 100644 index 0000000000..3be3a992dc --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/constructor.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-typedarray.prototype.constructor +description: > + The initial value of Uint16Array.prototype.constructor is the Uint16Array object. +info: | + The initial value of Uint16Array.prototype.constructor is the intrinsic + object %Uint16Array%. + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 18 through 26 and in Annex B.2 has + the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } + unless otherwise specified. +includes: [propertyHelper.js] +features: [TypedArray] +---*/ + +assert.sameValue(Uint16Array.prototype.constructor, Uint16Array); + +verifyNotEnumerable(Uint16Array.prototype, "constructor"); +verifyWritable(Uint16Array.prototype, "constructor"); +verifyConfigurable(Uint16Array.prototype, "constructor"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/not-typedarray-object.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/not-typedarray-object.js new file mode 100644 index 0000000000..10e2c7123a --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/not-typedarray-object.js @@ -0,0 +1,19 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-properties-of-typedarray-prototype-objects +description: > + Uint16Array.prototype is not a TypedArray instance object. +info: | + A TypedArray prototype object is an ordinary object. It does not have + a [[ViewedArrayBuffer]] or any other of the internal slots that are + specific to TypedArray instance objects. +features: [TypedArray] +---*/ + +assert.throws(TypeError, function() { + Uint16Array.prototype.buffer; +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/proto.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/proto.js new file mode 100644 index 0000000000..b28264d2f9 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/proto.js @@ -0,0 +1,17 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-properties-of-typedarray-prototype-objects +description: > + The prototype of Uint16Array.prototype is %TypedArrayPrototype%. +info: | + The value of the [[Prototype]] internal slot of a TypedArray prototype + object is the intrinsic object %TypedArrayPrototype% (22.2.3). +includes: [testTypedArray.js] +features: [TypedArray] +---*/ + +assert.sameValue(Object.getPrototypeOf(Uint16Array.prototype), TypedArray.prototype); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/shell.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint16Array/prototype/shell.js |