Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Number/S15.7.5_A1_T02.js

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