From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../BigUint64Array/prototype/BYTES_PER_ELEMENT.js | 26 ++++++++++++++++++++++ .../BigUint64Array/prototype/browser.js | 0 .../BigUint64Array/prototype/constructor.js | 25 +++++++++++++++++++++ .../prototype/not-typedarray-object.js | 20 +++++++++++++++++ .../BigUint64Array/prototype/proto.js | 19 ++++++++++++++++ .../BigUint64Array/prototype/shell.js | 0 6 files changed, 90 insertions(+) create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/BYTES_PER_ELEMENT.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/browser.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/constructor.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/not-typedarray-object.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/proto.js create mode 100644 js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/shell.js (limited to 'js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype') diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/BYTES_PER_ELEMENT.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/BYTES_PER_ELEMENT.js new file mode 100644 index 0000000000..9fe2a661da --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/BYTES_PER_ELEMENT.js @@ -0,0 +1,26 @@ +// Copyright (C) 2017 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-typedarray.prototype.bytes_per_element +description: BigUint64Array.prototype.BYTES_PER_ELEMENT property descriptor +info: | + 22.2.5.1 TypedArray.prototype.BYTES_PER_ELEMENT + + The value of TypedArray.prototype.BYTES_PER_ELEMENT is the Number + value of the Element Size value specified in Table 52 for TypedArray. + + This property has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: false }. +includes: [propertyHelper.js] +features: [BigInt] +---*/ + +verifyProperty(BigUint64Array.prototype, "BYTES_PER_ELEMENT", { + value: 8, + writable: false, + enumerable: false, + configurable: false +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/browser.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/browser.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/constructor.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/constructor.js new file mode 100644 index 0000000000..415a8f2fc3 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/constructor.js @@ -0,0 +1,25 @@ +// Copyright (C) 2017 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-typedarray.prototype.constructor +description: BigUint64Array.prototype.constructor property descriptor +info: | + 22.2.6.2 TypedArray.prototype.constructor + + The initial value of a TypedArray.prototype.constructor is the + corresponding %TypedArray% intrinsic object. + + 17 ECMAScript Standard Built-in Objects +includes: [propertyHelper.js] +features: [BigInt] +---*/ + +verifyProperty(BigUint64Array.prototype, "constructor", { + value: BigUint64Array, + writable: true, + enumerable: false, + configurable: true +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/not-typedarray-object.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/not-typedarray-object.js new file mode 100644 index 0000000000..d1d4230489 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/not-typedarray-object.js @@ -0,0 +1,20 @@ +// Copyright (C) 2017 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-properties-of-typedarray-prototype-objects +description: BigUint64Array.prototype is not a TypedArray instance +info: | + 22.2.6 Properties of TypedArray Prototype Objects + + [...] 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: [BigInt] +---*/ +assert.sameValue(typeof BigUint64Array, 'function'); +assert.throws(TypeError, function () { + BigUint64Array.prototype.buffer; +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/proto.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/proto.js new file mode 100644 index 0000000000..b114d3ae20 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/proto.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-properties-of-typedarray-prototype-objects +description: BigUint64Array.prototype prototype internal slot +info: | + 22.2.6 Properties of TypedArray Prototype Objects + + The value of the [[Prototype]] internal slot of a TypedArray prototype + object is the intrinsic object %TypedArrayPrototype%. [...] +includes: [testTypedArray.js] +features: [BigInt, TypedArray] +---*/ + +assert.sameValue(Object.getPrototypeOf(BigUint64Array.prototype), + TypedArray.prototype); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/shell.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigUint64Array/prototype/shell.js new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3