mirror of https://github.com/tc39/test262.git
Merge pull request #1315 from cxielarko/bigint-ta-2
BigInt64Array/BigUint64Array
This commit is contained in:
commit
e38587ec2c
|
@ -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
|
||||
});
|
|
@ -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");
|
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
|
@ -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);
|
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
|
@ -0,0 +1,18 @@
|
|||
// 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.throws(TypeError, function () {
|
||||
BigInt64Array.prototype.buffer;
|
||||
});
|
|
@ -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);
|
|
@ -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
|
||||
});
|
|
@ -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");
|
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
|
@ -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);
|
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
18
test/built-ins/TypedArrays/BigUint64Array/prototype/not-typedarray-object.js
vendored
Normal file
18
test/built-ins/TypedArrays/BigUint64Array/prototype/not-typedarray-object.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// 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.throws(TypeError, function () {
|
||||
BigUint64Array.prototype.buffer;
|
||||
});
|
|
@ -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);
|
Loading…
Reference in New Issue