diff --git a/test/built-ins/Number/prop-desc.js b/test/built-ins/Number/prop-desc.js new file mode 100644 index 0000000000000000000000000000000000000000..79b322472cd9ab6c4c08cbb3f0bf1097ac9e6599 --- /dev/null +++ b/test/built-ins/Number/prop-desc.js @@ -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.1.1 +esid: sec-number-constructor-number-value +description: > + Property descriptor of Number +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(this, "Number"); +verifyWritable(this, "Number"); +verifyConfigurable(this, "Number"); diff --git a/test/built-ins/Number/prototype/15.7.3.1-1.js b/test/built-ins/Number/prototype/15.7.3.1-1.js deleted file mode 100644 index cd834c8615967e32de17c3e8ed6db653de3d97b2..0000000000000000000000000000000000000000 --- a/test/built-ins/Number/prototype/15.7.3.1-1.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.7.3.1-1 -description: > - Number.prototype is a data property with default attribute values - (false) ----*/ - - var d = Object.getOwnPropertyDescriptor(Number, 'prototype'); - - -assert.sameValue(d.writable, false, 'd.writable'); -assert.sameValue(d.enumerable, false, 'd.enumerable'); -assert.sameValue(d.configurable, false, 'd.configurable'); diff --git a/test/built-ins/Number/prototype/S15.7.3.1_A1_T1.js b/test/built-ins/Number/prototype/S15.7.3.1_A1_T1.js deleted file mode 100644 index bb585b229c9fe7c7dbb1ef4beee054917a10578e..0000000000000000000000000000000000000000 --- a/test/built-ins/Number/prototype/S15.7.3.1_A1_T1.js +++ /dev/null @@ -1,18 +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 Number property "prototype" has { DontEnum, DontDelete, ReadOnly } - attributes -es5id: 15.7.3.1_A1_T1 -description: Checking if varying the Number.prototype property fails -includes: [propertyHelper.js] ----*/ - -//CHECK#1 -var x = Number.prototype; -verifyNotWritable(Number, "prototype", null, 1); -if (Number.prototype !== x) { - $ERROR('#1: The Number.prototype property has the attributes ReadOnly'); -} diff --git a/test/built-ins/Number/prototype/S15.7.3.1_A1_T2.js b/test/built-ins/Number/prototype/S15.7.3.1_A1_T2.js deleted file mode 100644 index d15410dc1c1433a2cb1dda74d41ae195173554ed..0000000000000000000000000000000000000000 --- a/test/built-ins/Number/prototype/S15.7.3.1_A1_T2.js +++ /dev/null @@ -1,27 +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 Number property "prototype" has { DontEnum, DontDelete, ReadOnly } - attributes -es5id: 15.7.3.1_A1_T2 -description: Checking if deleting the Number.prototype property fails -includes: [propertyHelper.js] ----*/ - -verifyNotConfigurable(Number, "prototype"); - -// CHECK#1 -try { - if (delete Number.prototype !== false) { - $ERROR('#1: The Number.prototype property has the attributes DontDelete'); - } -} catch (e) { - if (e instanceof Test262Error) throw e; - assert(e instanceof TypeError); -} - -if (!Number.hasOwnProperty('prototype')) { - $ERROR('#2: The Number.prototype property has the attributes DontDelete'); -} diff --git a/test/built-ins/Number/prototype/S15.7.3.1_A1_T3.js b/test/built-ins/Number/prototype/S15.7.3.1_A1_T3.js deleted file mode 100644 index 1dbca405ba0547ce44a62036b063c4c2a20b86be..0000000000000000000000000000000000000000 --- a/test/built-ins/Number/prototype/S15.7.3.1_A1_T3.js +++ /dev/null @@ -1,20 +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 Number property "prototype" has { DontEnum, DontDelete, ReadOnly } - attributes -es5id: 15.7.3.1_A1_T3 -description: Checking if enumerating the Number.prototype property fails ----*/ - -if (Number.propertyIsEnumerable('prototype')) { - $ERROR('#1: The Number.prototype property has the attribute DontEnum'); -} - -for(var x in Number) { - if(x === "prototype") { - $ERROR('#2: The Number.prototype has the attribute DontEnum'); - } -} diff --git a/test/built-ins/Number/prototype/prop-desc.js b/test/built-ins/Number/prototype/prop-desc.js new file mode 100644 index 0000000000000000000000000000000000000000..17e3a42131e94227b038e041e789b7380275df0e --- /dev/null +++ b/test/built-ins/Number/prototype/prop-desc.js @@ -0,0 +1,19 @@ +// 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.2.15 +esid: sec-number.prototype +description: > + "prototype" property of Number +info: > + Number.prototype + + This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: false }. +includes: [propertyHelper.js] +---*/ + +verifyNotEnumerable(Number, "prototype"); +verifyNotWritable(Number, "prototype"); +verifyNotConfigurable(Number, "prototype");