mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 885798 - Add ES6's Number.EPSILON. r=jwalden
This commit is contained in:
parent
6e1a1a8f90
commit
6c43ecbfbd
@ -1001,6 +1001,7 @@ enum nc_slot {
|
||||
NC_NEGATIVE_INFINITY,
|
||||
NC_MAX_VALUE,
|
||||
NC_MIN_VALUE,
|
||||
NC_EPSILON,
|
||||
NC_LIMIT
|
||||
};
|
||||
|
||||
@ -1015,6 +1016,8 @@ static JSConstDoubleSpec number_constants[] = {
|
||||
{0, "NEGATIVE_INFINITY", 0,{0,0,0}},
|
||||
{1.7976931348623157E+308, "MAX_VALUE", 0,{0,0,0}},
|
||||
{0, "MIN_VALUE", 0,{0,0,0}},
|
||||
/* ES6 (May 2013 draft) 15.7.3.7 */
|
||||
{2.2204460492503130808472633361816e-16, "EPSILON", 0,{0,0,0}},
|
||||
{0,0,0,{0,0,0}}
|
||||
};
|
||||
|
||||
|
24
js/src/tests/ecma_6/Number/15.7.3.7-EPSILON.js
Normal file
24
js/src/tests/ecma_6/Number/15.7.3.7-EPSILON.js
Normal file
@ -0,0 +1,24 @@
|
||||
// Any copyright is dedicated to the Public Domain.
|
||||
// http://creativecommons.org/licenses/publicdomain/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 885798;
|
||||
var summary = "ES6 (draft May 2013) 15.7.3.7 Number.EPSILON";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
// Test value
|
||||
assertEq(Number.EPSILON, Math.pow(2, -52));
|
||||
|
||||
// Test property attributes
|
||||
var descriptor = Object.getOwnPropertyDescriptor(Number, 'EPSILON');
|
||||
assertEq(descriptor.writable, false);
|
||||
assertEq(descriptor.configurable, false);
|
||||
assertEq(descriptor.enumerable, false);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
Loading…
Reference in New Issue
Block a user