diff options
author | Robin Templeton <robin@igalia.com> | 2017-10-24 11:44:56 -0400 |
---|---|---|
committer | Robin Templeton <robin@igalia.com> | 2017-10-24 11:44:56 -0400 |
commit | 46041c35ed64903001648ac1039771210c40826a (patch) | |
tree | 9994e39e0b1133d21026785bac5593a80087cbf9 /test/built-ins/TypedArrays | |
parent | a456b0a390bb0f70b4cb8d38cb5ab0ecb557a851 (diff) | |
download | qtdeclarative-testsuites-46041c35ed64903001648ac1039771210c40826a.tar.gz |
BigInt64Array/BigUint64Array
Diffstat (limited to 'test/built-ins/TypedArrays')
22 files changed, 510 insertions, 0 deletions
diff --git a/test/built-ins/TypedArrays/BigInt64Array/BYTES_PER_ELEMENT.js b/test/built-ins/TypedArrays/BigInt64Array/BYTES_PER_ELEMENT.js new file mode 100644 index 000000000..134d99ef7 --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/BYTES_PER_ELEMENT.js @@ -0,0 +1,24 @@ +// 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.bytes_per_element +description: BigInt64Array.BYTES_PER_ELEMENT property descriptor +info: > + 22.2.5.1 TypedArray.BYTES_PER_ELEMENT + + The value of TypedArray.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, "BYTES_PER_ELEMENT", { + value: 8, + writable: false, + enumerable: false, + configurable: false +}); diff --git a/test/built-ins/TypedArrays/BigInt64Array/constructor.js b/test/built-ins/TypedArrays/BigInt64Array/constructor.js new file mode 100644 index 000000000..aa514f539 --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/constructor.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-typedarray-constructors +description: BigInt64Array is a constructor function +info: > + 22.2.4 The TypedArray Constructors + + [...] + + The TypedArray intrinsic constructor functions are single functions + whose behaviour is overloaded based upon the number and types of its + arguments. The actual behaviour of a call of TypedArray depends upon + the number and kind of arguments that are passed to it. +features: [BigInt] +---*/ + +assert.sameValue(typeof BigInt64Array, "function"); diff --git a/test/built-ins/TypedArrays/BigInt64Array/length.js b/test/built-ins/TypedArrays/BigInt64Array/length.js new file mode 100644 index 000000000..843f54ff9 --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/length.js @@ -0,0 +1,36 @@ +// 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-constructors +description: BigInt64Array.length property descriptor +info: > + 22.2.4 The TypedArray Constructors + + [...] + + The length property of the TypedArray constructor function is 3. + + 17 ECMAScript Standard Built-in Objects + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + + Unless otherwise specified, the length property of a built-in + function object has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [BigInt] +---*/ + +verifyProperty(BigInt64Array, "length", { + value: 3, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArrays/BigInt64Array/name.js b/test/built-ins/TypedArrays/BigInt64Array/name.js new file mode 100644 index 000000000..5a6374de0 --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/name.js @@ -0,0 +1,36 @@ +// 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-the-typedarray-constructors +description: BigInt64Array.name property descriptor +info: > + 22.2.5 Properties of the TypedArray Constructors + + [...] + + Each TypedArray constructor has a name property whose value is the + String value of the constructor name specified for it in Table 52. + + 17 ECMAScript Standard Built-in Objects + + Every built-in function object, including constructors, that is not + identified as an anonymous function has a name property whose value + is a String. Unless otherwise specified, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [BigInt] +---*/ + +verifyProperty(BigInt64Array, "name", { + value: "BigInt64Array", + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArrays/BigInt64Array/prop-desc.js b/test/built-ins/TypedArrays/BigInt64Array/prop-desc.js new file mode 100644 index 000000000..1253e81cd --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/prop-desc.js @@ -0,0 +1,17 @@ +// 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-objects +description: BigInt64Array property descriptor +info: > + 17 ECMAScript Standard Built-in Objects +includes: [propertyHelper.js] +features: [BigInt] +---*/ + +verifyProperty(this, "BigInt64Array", { + writable: true, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArrays/BigInt64Array/proto.js b/test/built-ins/TypedArrays/BigInt64Array/proto.js new file mode 100644 index 000000000..2201e30ee --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/proto.js @@ -0,0 +1,16 @@ +// 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-the-typedarray-constructors +description: BigInt64Array prototype internal slot +info: > + 22.2.5 Properties of the TypedArray Constructors + + The value of the [[Prototype]] internal slot of each TypedArray + constructor is the %TypedArray% intrinsic object. +includes: [testTypedArray.js] +features: [BigInt, TypedArray] +---*/ + +assert.sameValue(Object.getPrototypeOf(BigInt64Array), TypedArray); diff --git a/test/built-ins/TypedArrays/BigInt64Array/prototype.js b/test/built-ins/TypedArrays/BigInt64Array/prototype.js new file mode 100644 index 000000000..1b8ca3ff2 --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/prototype.js @@ -0,0 +1,24 @@ +// 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 +description: BigInt64Array.prototype property descriptor +info: > + 22.2.5.2 TypedArray.prototype + + 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: [BigInt] +---*/ + +verifyProperty(BigInt64Array, "prototype", { + value: Object.getPrototypeOf(new BigInt64Array()), + writable: false, + enumerable: false, + configurable: false +}); diff --git a/test/built-ins/TypedArrays/BigInt64Array/prototype/BYTES_PER_ELEMENT.js b/test/built-ins/TypedArrays/BigInt64Array/prototype/BYTES_PER_ELEMENT.js new file mode 100644 index 000000000..14106c83f --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/prototype/BYTES_PER_ELEMENT.js @@ -0,0 +1,24 @@ +// 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 +}); diff --git a/test/built-ins/TypedArrays/BigInt64Array/prototype/constructor.js b/test/built-ins/TypedArrays/BigInt64Array/prototype/constructor.js new file mode 100644 index 000000000..8ff9c67ac --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/prototype/constructor.js @@ -0,0 +1,23 @@ +// 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 +}); diff --git a/test/built-ins/TypedArrays/BigInt64Array/prototype/not-typedarray-object.js b/test/built-ins/TypedArrays/BigInt64Array/prototype/not-typedarray-object.js new file mode 100644 index 000000000..8163169c5 --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/prototype/not-typedarray-object.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 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. +includes: [testTypedArray.js] +features: [BigInt] +---*/ + +assert.throws(TypeError, function () { + BigInt64Array.prototype.buffer; +}); diff --git a/test/built-ins/TypedArrays/BigInt64Array/prototype/proto.js b/test/built-ins/TypedArrays/BigInt64Array/prototype/proto.js new file mode 100644 index 000000000..f52dd35fa --- /dev/null +++ b/test/built-ins/TypedArrays/BigInt64Array/prototype/proto.js @@ -0,0 +1,17 @@ +// 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); diff --git a/test/built-ins/TypedArrays/BigUint64Array/BYTES_PER_ELEMENT.js b/test/built-ins/TypedArrays/BigUint64Array/BYTES_PER_ELEMENT.js new file mode 100644 index 000000000..5b0a710c6 --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/BYTES_PER_ELEMENT.js @@ -0,0 +1,24 @@ +// 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.bytes_per_element +description: BigUint64Array.BYTES_PER_ELEMENT property descriptor +info: > + 22.2.5.1 TypedArray.BYTES_PER_ELEMENT + + The value of TypedArray.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, "BYTES_PER_ELEMENT", { + value: 8, + writable: false, + enumerable: false, + configurable: false +}); diff --git a/test/built-ins/TypedArrays/BigUint64Array/constructor.js b/test/built-ins/TypedArrays/BigUint64Array/constructor.js new file mode 100644 index 000000000..a646dd91b --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/constructor.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-typedarray-constructors +description: BigUint64Array is a constructor function +info: > + 22.2.4 The TypedArray Constructors + + [...] + + The TypedArray intrinsic constructor functions are single functions + whose behaviour is overloaded based upon the number and types of its + arguments. The actual behaviour of a call of TypedArray depends upon + the number and kind of arguments that are passed to it. +features: [BigInt] +---*/ + +assert.sameValue(typeof BigUint64Array, "function"); diff --git a/test/built-ins/TypedArrays/BigUint64Array/length.js b/test/built-ins/TypedArrays/BigUint64Array/length.js new file mode 100644 index 000000000..2c8efd3c2 --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/length.js @@ -0,0 +1,36 @@ +// 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-constructors +description: BigUint64Array.length property descriptor +info: > + 22.2.4 The TypedArray Constructors + + [...] + + The length property of the TypedArray constructor function is 3. + + 17 ECMAScript Standard Built-in Objects + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + + Unless otherwise specified, the length property of a built-in + function object has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [BigInt] +---*/ + +verifyProperty(BigUint64Array, "length", { + value: 3, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArrays/BigUint64Array/name.js b/test/built-ins/TypedArrays/BigUint64Array/name.js new file mode 100644 index 000000000..73fb580d6 --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/name.js @@ -0,0 +1,36 @@ +// 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-the-typedarray-constructors +description: BigUint64Array.name property descriptor +info: > + 22.2.5 Properties of the TypedArray Constructors + + [...] + + Each TypedArray constructor has a name property whose value is the + String value of the constructor name specified for it in Table 52. + + 17 ECMAScript Standard Built-in Objects + + Every built-in function object, including constructors, that is not + identified as an anonymous function has a name property whose value + is a String. Unless otherwise specified, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [BigInt] +---*/ + +verifyProperty(BigUint64Array, "name", { + value: "BigUint64Array", + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArrays/BigUint64Array/prop-desc.js b/test/built-ins/TypedArrays/BigUint64Array/prop-desc.js new file mode 100644 index 000000000..9a2d4d6d6 --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/prop-desc.js @@ -0,0 +1,17 @@ +// 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-objects +description: BigUint64Array property descriptor +info: > + 17 ECMAScript Standard Built-in Objects +includes: [propertyHelper.js] +features: [BigInt] +---*/ + +verifyProperty(this, "BigUint64Array", { + writable: true, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArrays/BigUint64Array/proto.js b/test/built-ins/TypedArrays/BigUint64Array/proto.js new file mode 100644 index 000000000..a9b3a3b9a --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/proto.js @@ -0,0 +1,16 @@ +// 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-the-typedarray-constructors +description: BigUint64Array prototype internal slot +info: > + 22.2.5 Properties of the TypedArray Constructors + + The value of the [[Prototype]] internal slot of each TypedArray + constructor is the %TypedArray% intrinsic object. +includes: [testTypedArray.js] +features: [BigInt, TypedArray] +---*/ + +assert.sameValue(Object.getPrototypeOf(BigUint64Array), TypedArray); diff --git a/test/built-ins/TypedArrays/BigUint64Array/prototype.js b/test/built-ins/TypedArrays/BigUint64Array/prototype.js new file mode 100644 index 000000000..3083cdb28 --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/prototype.js @@ -0,0 +1,24 @@ +// 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 +description: BigUint64Array.prototype property descriptor +info: > + 22.2.5.2 TypedArray.prototype + + 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: [BigInt] +---*/ + +verifyProperty(BigUint64Array, "prototype", { + value: Object.getPrototypeOf(new BigUint64Array()), + writable: false, + enumerable: false, + configurable: false +}); diff --git a/test/built-ins/TypedArrays/BigUint64Array/prototype/BYTES_PER_ELEMENT.js b/test/built-ins/TypedArrays/BigUint64Array/prototype/BYTES_PER_ELEMENT.js new file mode 100644 index 000000000..bc150f5af --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/prototype/BYTES_PER_ELEMENT.js @@ -0,0 +1,24 @@ +// 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 +}); diff --git a/test/built-ins/TypedArrays/BigUint64Array/prototype/constructor.js b/test/built-ins/TypedArrays/BigUint64Array/prototype/constructor.js new file mode 100644 index 000000000..3e664c543 --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/prototype/constructor.js @@ -0,0 +1,23 @@ +// 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 +}); diff --git a/test/built-ins/TypedArrays/BigUint64Array/prototype/not-typedarray-object.js b/test/built-ins/TypedArrays/BigUint64Array/prototype/not-typedarray-object.js new file mode 100644 index 000000000..4c2e47e2c --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/prototype/not-typedarray-object.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 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. +includes: [testTypedArray.js] +features: [BigInt] +---*/ + +assert.throws(TypeError, function () { + BigUint64Array.prototype.buffer; +}); diff --git a/test/built-ins/TypedArrays/BigUint64Array/prototype/proto.js b/test/built-ins/TypedArrays/BigUint64Array/prototype/proto.js new file mode 100644 index 000000000..f19331020 --- /dev/null +++ b/test/built-ins/TypedArrays/BigUint64Array/prototype/proto.js @@ -0,0 +1,17 @@ +// 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); |