From 0d44bc821de4672c5c0c8986cd87c49932563c7f Mon Sep 17 00:00:00 2001 From: Robin Templeton Date: Mon, 16 Oct 2017 12:55:56 -0400 Subject: [PATCH] [BigInt] constructor, name, length properties --- test/built-ins/BigInt/length.js | 32 +++++++++++++++++++ test/built-ins/BigInt/name.js | 31 ++++++++++++++++++ .../built-ins/BigInt/prototype/constructor.js | 29 +++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 test/built-ins/BigInt/length.js create mode 100644 test/built-ins/BigInt/name.js create mode 100644 test/built-ins/BigInt/prototype/constructor.js diff --git a/test/built-ins/BigInt/length.js b/test/built-ins/BigInt/length.js new file mode 100644 index 00000000000..f55b9b2ac32 --- /dev/null +++ b/test/built-ins/BigInt/length.js @@ -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 +}); diff --git a/test/built-ins/BigInt/name.js b/test/built-ins/BigInt/name.js new file mode 100644 index 00000000000..450668785b5 --- /dev/null +++ b/test/built-ins/BigInt/name.js @@ -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 +}); diff --git a/test/built-ins/BigInt/prototype/constructor.js b/test/built-ins/BigInt/prototype/constructor.js new file mode 100644 index 00000000000..5bb7bbb29ca --- /dev/null +++ b/test/built-ins/BigInt/prototype/constructor.js @@ -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 +});