-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1315 from cxielarko/bigint-ta-2
BigInt64Array/BigUint64Array
- Loading branch information
Showing
22 changed files
with
508 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
test/built-ins/TypedArrays/BigInt64Array/BYTES_PER_ELEMENT.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
24 changes: 24 additions & 0 deletions
24
test/built-ins/TypedArrays/BigInt64Array/prototype/BYTES_PER_ELEMENT.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
23 changes: 23 additions & 0 deletions
23
test/built-ins/TypedArrays/BigInt64Array/prototype/constructor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
18 changes: 18 additions & 0 deletions
18
test/built-ins/TypedArrays/BigInt64Array/prototype/not-typedarray-object.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}); |
17 changes: 17 additions & 0 deletions
17
test/built-ins/TypedArrays/BigInt64Array/prototype/proto.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
24 changes: 24 additions & 0 deletions
24
test/built-ins/TypedArrays/BigUint64Array/BYTES_PER_ELEMENT.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}); |
Oops, something went wrong.