From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../Uint32Array/prototype/BYTES_PER_ELEMENT.js | 23 +++++++++++++++++++ .../Uint32Array/prototype/browser.js | 0 .../Uint32Array/prototype/constructor.js | 26 ++++++++++++++++++++++ .../Uint32Array/prototype/not-typedarray-object.js | 19 ++++++++++++++++ .../Uint32Array/prototype/proto.js | 17 ++++++++++++++ .../Uint32Array/prototype/shell.js | 0 6 files changed, 85 insertions(+) create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/BYTES_PER_ELEMENT.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/browser.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/constructor.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/not-typedarray-object.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/proto.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/shell.js (limited to 'js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype') diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/BYTES_PER_ELEMENT.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/BYTES_PER_ELEMENT.js new file mode 100644 index 0000000000..f75d146066 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/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 Uint32Array.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(Uint32Array.prototype.BYTES_PER_ELEMENT, 4); + +verifyNotEnumerable(Uint32Array.prototype, "BYTES_PER_ELEMENT"); +verifyNotWritable(Uint32Array.prototype, "BYTES_PER_ELEMENT"); +verifyNotConfigurable(Uint32Array.prototype, "BYTES_PER_ELEMENT"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/browser.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/browser.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/constructor.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/constructor.js new file mode 100644 index 0000000000..04a94a3139 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/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 Uint32Array.prototype.constructor is the Uint32Array object. +info: | + The initial value of Uint32Array.prototype.constructor is the intrinsic + object %Uint32Array%. + + 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(Uint32Array.prototype.constructor, Uint32Array); + +verifyNotEnumerable(Uint32Array.prototype, "constructor"); +verifyWritable(Uint32Array.prototype, "constructor"); +verifyConfigurable(Uint32Array.prototype, "constructor"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/not-typedarray-object.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/not-typedarray-object.js new file mode 100644 index 0000000000..31c49abe88 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/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: > + Uint32Array.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() { + Uint32Array.prototype.buffer; +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/proto.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/proto.js new file mode 100644 index 0000000000..db175cdf0f --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/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 Uint32Array.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(Uint32Array.prototype), TypedArray.prototype); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/shell.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Uint32Array/prototype/shell.js new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3