diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype')
6 files changed, 90 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/BYTES_PER_ELEMENT.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/BYTES_PER_ELEMENT.js new file mode 100644 index 0000000000..135681804d --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/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: BigInt64Array.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(BigInt64Array.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/BigInt64Array/prototype/browser.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/browser.js diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/constructor.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/constructor.js new file mode 100644 index 0000000000..5b10a19b66 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/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: BigInt64Array.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(BigInt64Array.prototype, "constructor", { + value: BigInt64Array, + writable: true, + enumerable: false, + configurable: true +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/not-typedarray-object.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/not-typedarray-object.js new file mode 100644 index 0000000000..716b051ec3 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/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: BigInt64Array.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 BigInt64Array, 'function'); +assert.throws(TypeError, function () { + BigInt64Array.prototype.buffer; +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/proto.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/proto.js new file mode 100644 index 0000000000..460aaca932 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/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: BigInt64Array.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(BigInt64Array.prototype), + TypedArray.prototype); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/shell.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/BigInt64Array/prototype/shell.js |