| 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_T07 |
| 9 |
description: Checking property toPrecision |
| 10 |
---*/ |
| 11 |
|
| 12 |
//CHECK#1 |
| 13 |
if ((new Number()).hasOwnProperty("toPrecision") !== false) { |
| 14 |
$ERROR('#1: Number instance must have no special property "toPrecision"'); |
| 15 |
} |
| 16 |
|
| 17 |
//CHECK#2 |
| 18 |
if ((new Number()).toPrecision !== Number.prototype.toPrecision) { |
| 19 |
$ERROR('#2: Number instance property "toPrecision" must be inherited from Number prototype object'); |
| 20 |
} |