mirror of https://github.com/tc39/test262.git
Merge pull request #1279 from cxielarko/bigint-constructor
Property descriptor tests for BigInt.name, BigInt.length, and BigInt.prototype.constructor
This commit is contained in:
commit
339222b445
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
|
@ -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
|
||||
});
|
Loading…
Reference in New Issue