Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions test/built-ins/Number/EPSILON/prop-desc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Test generated by: property-test-generator

/*---
esid: sec-number.epsilon
description: Property test for Number.EPSILON
info: |
Number.EPSILON
- The value of `Number.EPSILON` is the Number value for the magnitude of the
difference between 1 and the smallest value greater than 1 that is
representable as a Number value, which is approximately
2.2204460492503130808472633361816 × 10-16.
- This property has the attributes { [[Writable]]: false, [[Enumerable]]:
false, [[Configurable]]: false }.

ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
flags: [generated]
includes: [propertyHelper.js]
---*/

verifyPrimordialProperty(Number, "EPSILON", {
value: 2.2204460492503130808472633361816e-16,
writable: false,
enumerable: false,
configurable: false,
});
26 changes: 26 additions & 0 deletions test/built-ins/Number/MAX_SAFE_INTEGER/prop-desc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Test generated by: property-test-generator

/*---
esid: sec-number.max_safe_integer
description: Property test for Number.MAX_SAFE_INTEGER
info: |
Number.MAX_SAFE_INTEGER
- The value of `Number.MAX_SAFE_INTEGER` is 9007199254740991𝔽 (𝔽(253 - 1)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, that's quite a confusing way to render 2**53.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, fixing this will require rewriting <sup> tags to some other representation.

This the source code from spec.html:

<p>The value of `Number.MAX_SAFE_INTEGER` is *9007199254740991*<sub>𝔽</sub> (𝔽(2<sup>53</sup> - 1)).</p>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The value of `Number.MAX_SAFE_INTEGER` is 9007199254740991𝔽 (𝔽(253 - 1)).
- The value of `Number.MAX_SAFE_INTEGER` is 9007199254740991𝔽 (𝔽(2⁵³ - 1)).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, fixing this will require rewriting <sup> tags to some other representation.

We're already doing this as of tc39/ecmarkup#517 . For example, the text at https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number.max_safe_integer now copies as

Suggested change
- The value of `Number.MAX_SAFE_INTEGER` is 9007199254740991𝔽 (𝔽(253 - 1)).
- The value of Number.MAX_SAFE_INTEGER is 9007199254740991𝔽 (𝔽(2**53 - 1)).

- This property has the attributes { [[Writable]]: false, [[Enumerable]]:
false, [[Configurable]]: false }.

ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
flags: [generated]
includes: [propertyHelper.js]
---*/

verifyPrimordialProperty(Number, "MAX_SAFE_INTEGER", {
value: 9007199254740991,
writable: false,
enumerable: false,
configurable: false,
});
27 changes: 27 additions & 0 deletions test/built-ins/Number/MAX_VALUE/prop-desc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Test generated by: property-test-generator

/*---
esid: sec-number.max_value
description: Property test for Number.MAX_VALUE
info: |
Number.MAX_VALUE
- The value of `Number.MAX_VALUE` is the largest positive finite value of the
Number type, which is approximately 1.7976931348623157 × 10308.
- This property has the attributes { [[Writable]]: false, [[Enumerable]]:
false, [[Configurable]]: false }.

ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
flags: [generated]
includes: [propertyHelper.js]
---*/

verifyPrimordialProperty(Number, "MAX_VALUE", {
value: 1.7976931348623157e308,
writable: false,
enumerable: false,
configurable: false,
});
27 changes: 27 additions & 0 deletions test/built-ins/Number/MIN_SAFE_INTEGER/prop-desc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Test generated by: property-test-generator

/*---
esid: sec-number.min_safe_integer
description: Property test for Number.MIN_SAFE_INTEGER
info: |
Number.MIN_SAFE_INTEGER
- The value of `Number.MIN_SAFE_INTEGER` is -9007199254740991𝔽 (𝔽(-(253 -
1))).
- This property has the attributes { [[Writable]]: false, [[Enumerable]]:
false, [[Configurable]]: false }.

ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
flags: [generated]
includes: [propertyHelper.js]
---*/

verifyPrimordialProperty(Number, "MIN_SAFE_INTEGER", {
value: -9007199254740991,
writable: false,
enumerable: false,
configurable: false,
});
32 changes: 32 additions & 0 deletions test/built-ins/Number/MIN_VALUE/prop-desc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Test generated by: property-test-generator

/*---
esid: sec-number.min_value
description: Property test for Number.MIN_VALUE
info: |
Number.MIN_VALUE
- The value of `Number.MIN_VALUE` is the smallest positive value of the Number
type, which is approximately 5 × 10-324.
- In the IEEE 754-2019 double precision binary representation, the smallest
possible value is a denormalized number. If an implementation does not
support denormalized values, the value of `Number.MIN_VALUE` must be the
smallest non-zero positive value that can actually be represented by the
implementation.
- This property has the attributes { [[Writable]]: false, [[Enumerable]]:
false, [[Configurable]]: false }.

ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
flags: [generated]
includes: [propertyHelper.js]
---*/

verifyPrimordialProperty(Number, "MIN_VALUE", {
value: 5e-324,
writable: false,
enumerable: false,
configurable: false,
});
26 changes: 17 additions & 9 deletions test/built-ins/Number/NEGATIVE_INFINITY/prop-desc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
// Test generated by: property-test-generator

/*---
esid: sec-number.negative_infinity
description: >
"NEGATIVE_INFINITY" property of Number
description: Property test for Number.NEGATIVE_INFINITY
info: |
Number.NEGATIVE_INFINITY
- The value of `Number.NEGATIVE_INFINITY` is -∞𝔽.
- This property has the attributes { [[Writable]]: false, [[Enumerable]]:
false, [[Configurable]]: false }.

This property has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: false }.
ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
flags: [generated]
includes: [propertyHelper.js]
---*/

verifyNotEnumerable(Number, "NEGATIVE_INFINITY");
verifyNotWritable(Number, "NEGATIVE_INFINITY");
verifyNotConfigurable(Number, "NEGATIVE_INFINITY");
verifyPrimordialProperty(Number, "NEGATIVE_INFINITY", {
value: -1/0,
writable: false,
enumerable: false,
configurable: false,
});
26 changes: 26 additions & 0 deletions test/built-ins/Number/NaN/prop-desc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Test generated by: property-test-generator

/*---
esid: sec-number.nan
description: Property test for Number.NaN
info: |
Number.NaN
- The value of `Number.NaN` is NaN.
- This property has the attributes { [[Writable]]: false, [[Enumerable]]:
false, [[Configurable]]: false }.

ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
flags: [generated]
includes: [propertyHelper.js]
---*/

verifyPrimordialProperty(Number, "NaN", {
value: 0/0,
writable: false,
enumerable: false,
configurable: false,
});
26 changes: 17 additions & 9 deletions test/built-ins/Number/POSITIVE_INFINITY/prop-desc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
// Test generated by: property-test-generator

/*---
esid: sec-number.positive_infinity
description: >
"POSITIVE_INFINITY" property of Number
description: Property test for Number.POSITIVE_INFINITY
info: |
Number.POSITIVE_INFINITY
- The value of `Number.POSITIVE_INFINITY` is +∞𝔽.
- This property has the attributes { [[Writable]]: false, [[Enumerable]]:
false, [[Configurable]]: false }.

This property has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: false }.
ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
flags: [generated]
includes: [propertyHelper.js]
---*/

verifyNotEnumerable(Number, "POSITIVE_INFINITY");
verifyNotWritable(Number, "POSITIVE_INFINITY");
verifyNotConfigurable(Number, "POSITIVE_INFINITY");
verifyPrimordialProperty(Number, "POSITIVE_INFINITY", {
value: 1/0,
writable: false,
enumerable: false,
configurable: false,
});
18 changes: 18 additions & 0 deletions test/built-ins/Number/ctor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Test generated by: property-test-generator

/*---
esid: sec-number-constructor
description: Property test for Number
info: |
The Number Constructor

Number ( value )

Properties of the Number Constructor
- has a [[Prototype]] internal slot whose value is %Function.prototype%.
flags: [generated]
includes: [builtin.js, propertyHelper.js]
features: [Proxy, Reflect, Reflect.construct]
---*/

verifyBuiltinConstructor(Number, "Number", 1, Function.prototype);
23 changes: 14 additions & 9 deletions test/built-ins/Number/isFinite/prop-desc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
// Test generated by: property-test-generator

/*---
esid: sec-number.isfinite
description: >
"isFinite" property of Number
description: Property test for Number.isFinite
info: |
17 ECMAScript Standard Built-in Objects:
Number.isFinite ( number )

Every other data property described in clauses 18 through 26 and in Annex B.2
ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
flags: [generated]
includes: [builtin.js, propertyHelper.js]
features: [Proxy, Reflect, Reflect.construct]
---*/

verifyProperty(Number, "isFinite", {
verifyBuiltinFunction(Number.isFinite, "isFinite", 1);

verifyPrimordialProperty(Number, "isFinite", {
value: Number.isFinite,
writable: true,
enumerable: false,
configurable: true
configurable: true,
});
23 changes: 14 additions & 9 deletions test/built-ins/Number/isInteger/prop-desc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
// Test generated by: property-test-generator

/*---
esid: sec-number.isinteger
description: >
"isInteger" property of Number
description: Property test for Number.isInteger
info: |
17 ECMAScript Standard Built-in Objects:
Number.isInteger ( number )

Every other data property described in clauses 18 through 26 and in Annex B.2
ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
flags: [generated]
includes: [builtin.js, propertyHelper.js]
features: [Proxy, Reflect, Reflect.construct]
---*/

verifyProperty(Number, "isInteger", {
verifyBuiltinFunction(Number.isInteger, "isInteger", 1);

verifyPrimordialProperty(Number, "isInteger", {
value: Number.isInteger,
writable: true,
enumerable: false,
configurable: true
configurable: true,
});
23 changes: 14 additions & 9 deletions test/built-ins/Number/isNaN/prop-desc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
// Test generated by: property-test-generator

/*---
esid: sec-number.isnan
description: >
"isNaN" property of Number
description: Property test for Number.isNaN
info: |
17 ECMAScript Standard Built-in Objects:
Number.isNaN ( number )

Every other data property described in clauses 18 through 26 and in Annex B.2
ECMAScript Standard Built-in Objects

Every other data property described in clauses 19 through 28 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
flags: [generated]
includes: [builtin.js, propertyHelper.js]
features: [Proxy, Reflect, Reflect.construct]
---*/

verifyProperty(Number, "isNaN", {
verifyBuiltinFunction(Number.isNaN, "isNaN", 1);

verifyPrimordialProperty(Number, "isNaN", {
value: Number.isNaN,
writable: true,
enumerable: false,
configurable: true
configurable: true,
});
Loading