-
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 #1279 from cxielarko/bigint-constructor
Property descriptor tests for BigInt.name, BigInt.length, and BigInt.prototype.constructor
- Loading branch information
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
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,32 @@ | ||
// Copyright (C) 2017 Robin Templeton. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-bigint-constructor-number-value | ||
description: BigInt.length property descriptor | ||
info: > | ||
BigInt ( value ) | ||
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(BigInt, "length", { | ||
value: 1, | ||
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,31 @@ | ||
// Copyright (C) 2017 Robin Templeton. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-bigint-constructor-number-value | ||
description: BigInt.name property descriptor | ||
info: > | ||
BigInt ( value ) | ||
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(BigInt, "name", { | ||
value: "BigInt", | ||
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,29 @@ | ||
// Copyright (C) 2017 Robin Templeton. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-bigint.prototype.constructor | ||
description: BigInt.prototype.constructor property descriptor | ||
info: > | ||
BigInt.prototype.constructor | ||
The initial value of BigInt.prototype.constructor is the intrinsic | ||
object %BigInt%. | ||
The BigInt Constructor | ||
The BigInt constructor is the %BigInt% intrinsic object and the | ||
initial value of the BigInt property of the global object. When BigInt | ||
is called as a function, it performs a type conversion. | ||
17 ECMAScript Standard Built-in Objects | ||
includes: [propertyHelper.js] | ||
features: [BigInt] | ||
---*/ | ||
|
||
verifyProperty(BigInt.prototype, "constructor", { | ||
value: BigInt, | ||
writable: true, | ||
enumerable: false, | ||
configurable: true | ||
}); |