mirror of https://github.com/tc39/test262.git
Add prop-desc tests for Number.prototype properties
This commit is contained in:
parent
4dd7e5aa4b
commit
1eaae52eb8
|
@ -0,0 +1,21 @@
|
|||
// Copyright (C) 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es6id: 20.1.3.1
|
||||
esid: sec-number.prototype.constructor
|
||||
description: >
|
||||
Property descriptor and value for Number.prototype.constructor
|
||||
info: >
|
||||
Number.prototype.constructor
|
||||
|
||||
The initial value of Number.prototype.constructor is the intrinsic object
|
||||
%Number%.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number.prototype.constructor, Number);
|
||||
|
||||
verifyNotEnumerable(Number.prototype, "constructor");
|
||||
verifyWritable(Number.prototype, "constructor");
|
||||
verifyConfigurable(Number.prototype, "constructor");
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: >
|
||||
The initial value of Number.prototype.constructor is the
|
||||
built-in Number constructor
|
||||
es5id: 15.7.4.1_A1
|
||||
description: Compare Number.prototype.constructor with Number
|
||||
---*/
|
||||
|
||||
//CHECK#1
|
||||
if(Number.prototype.constructor !== Number){
|
||||
$ERROR('#1: Number.prototype.constructor === Number');
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es6id: 20.1.3.3
|
||||
esid: sec-number.prototype.tofixed
|
||||
description: >
|
||||
"toFixed" property of Number.prototype
|
||||
info: >
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
|
||||
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Number.prototype, "toFixed");
|
||||
verifyWritable(Number.prototype, "toFixed");
|
||||
verifyConfigurable(Number.prototype, "toFixed");
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es6id: 20.1.3.4
|
||||
esid: sec-number.prototype.tolocalestring
|
||||
description: >
|
||||
"toLocaleString" property of Number.prototype
|
||||
info: >
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
|
||||
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Number.prototype, "toLocaleString");
|
||||
verifyWritable(Number.prototype, "toLocaleString");
|
||||
verifyConfigurable(Number.prototype, "toLocaleString");
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es6id: 20.1.3.6
|
||||
esid: sec-number.prototype.tostring
|
||||
description: >
|
||||
"toString" property of Number.prototype
|
||||
info: >
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
|
||||
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Number.prototype, "toString");
|
||||
verifyWritable(Number.prototype, "toString");
|
||||
verifyConfigurable(Number.prototype, "toString");
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es6id: 20.1.3.7
|
||||
esid: sec-number.prototype.valueof
|
||||
description: >
|
||||
"valueOf" property of Number.prototype
|
||||
info: >
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
|
||||
Every other data property described in clauses 18 through 26 and in Annex B.2
|
||||
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Number.prototype, "valueOf");
|
||||
verifyWritable(Number.prototype, "valueOf");
|
||||
verifyConfigurable(Number.prototype, "valueOf");
|
Loading…
Reference in New Issue