diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
7 files changed, 107 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype.js new file mode 100644 index 0000000000..8005d5f814 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype.js @@ -0,0 +1,22 @@ +// 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 +description: > + The initial value of Int32Array.prototype is the Int32Array prototype object. +info: | + The initial value of TypedArray.prototype is the corresponding TypedArray prototype intrinsic object (22.2.6). + + This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }. +includes: [propertyHelper.js] +features: [TypedArray] +---*/ + +assert.sameValue(Int32Array.prototype, Object.getPrototypeOf(new Int32Array(0))); + +verifyNotEnumerable(Int32Array, "prototype"); +verifyNotWritable(Int32Array, "prototype"); +verifyNotConfigurable(Int32Array, "prototype"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/BYTES_PER_ELEMENT.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/BYTES_PER_ELEMENT.js new file mode 100644 index 0000000000..a2fbafe0f8 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/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 Int32Array.prototype.BYTES_PER_ELEMENT is 4. +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(Int32Array.prototype.BYTES_PER_ELEMENT, 4); + +verifyNotEnumerable(Int32Array.prototype, "BYTES_PER_ELEMENT"); +verifyNotWritable(Int32Array.prototype, "BYTES_PER_ELEMENT"); +verifyNotConfigurable(Int32Array.prototype, "BYTES_PER_ELEMENT"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/browser.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/browser.js diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/constructor.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/constructor.js new file mode 100644 index 0000000000..2489221760 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/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 Int32Array.prototype.constructor is the Int32Array object. +info: | + The initial value of Int32Array.prototype.constructor is the intrinsic + object %Int32Array%. + + 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(Int32Array.prototype.constructor, Int32Array); + +verifyNotEnumerable(Int32Array.prototype, "constructor"); +verifyWritable(Int32Array.prototype, "constructor"); +verifyConfigurable(Int32Array.prototype, "constructor"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/not-typedarray-object.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/not-typedarray-object.js new file mode 100644 index 0000000000..ba3e48ea62 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/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: > + Int32Array.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() { + Int32Array.prototype.buffer; +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/proto.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/proto.js new file mode 100644 index 0000000000..cdec27c587 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/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 Int32Array.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(Int32Array.prototype), TypedArray.prototype); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/shell.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Int32Array/prototype/shell.js |