keith_miller@apple.com | bcc77f2 | 2016-07-15 06:03:25 +0000 | [diff] [blame] | 1 | // Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | info: > |
| 6 | Number instances have no special properties beyond those |
| 7 | inherited from the Number prototype object |
| 8 | es5id: 15.7.5_A1_T04 |
| 9 | description: Checking property valueOf |
| 10 | ---*/ |
| 11 | |
| 12 | //CHECK#1 |
| 13 | if((new Number()).hasOwnProperty("valueOf") !== false){ |
| 14 | $ERROR('#1: Number instance must have no special property "valueOf"'); |
| 15 | } |
| 16 | |
| 17 | //CHECK#2 |
| 18 | if((new Number()).valueOf !== Number.prototype.valueOf){ |
| 19 | $ERROR('#2: Number instance property "valueOf" must be inherited from Number prototype object'); |
| 20 | } |