Debian Codegraph @

js/src/tests/test262/language/expressions/property-accessors/S11.2.1_A4_T7.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: Check type of various properties
6 es5id: 11.2.1_A4_T7
7 description: Checking properties of the Number object
8 ---*/
9
10 //CHECK#1-16
11 if (typeof Number.MAX_VALUE !== "number") throw new Test262Error('#1: typeof Number.MAX_VALUE === "number". Actual: ' + (typeof Number.MAX_VALUE ));
12 if (typeof Number['MAX_VALUE'] !== "number") throw new Test262Error('#2: typeof Number["MAX_VALUE"] === "number". Actual: ' + (typeof Number["MAX_VALUE"] ));
13 if (typeof Number.MIN_VALUE !== "number") throw new Test262Error('#3: typeof Number.MIN_VALUE === "number". Actual: ' + (typeof Number.MIN_VALUE ));
14 if (typeof Number['MIN_VALUE'] !== "number") throw new Test262Error('#4: typeof Number["MIN_VALUE"] === "number". Actual: ' + (typeof Number["MIN_VALUE"] ));
15 if (typeof Number.NaN !== "number") throw new Test262Error('#5: typeof Number.NaN === "number". Actual: ' + (typeof Number.NaN ));
16 if (typeof Number['NaN'] !== "number") throw new Test262Error('#6: typeof Number["NaN"] === "number". Actual: ' + (typeof Number["NaN"] ));
17 if (typeof Number.NEGATIVE_INFINITY !== "number") throw new Test262Error('#7: typeof Number.NEGATIVE_INFINITY === "number". Actual: ' + (typeof Number.NEGATIVE_INFINITY ));
18 if (typeof Number['NEGATIVE_INFINITY'] !== "number") throw new Test262Error('#8: typeof Number["NEGATIVE_INFINITY"] === "number". Actual: ' + (typeof Number["NEGATIVE_INFINITY"] ));
19 if (typeof Number.POSITIVE_INFINITY !== "number") throw new Test262Error('#9: typeof Number.POSITIVE_INFINITY === "number". Actual: ' + (typeof Number.POSITIVE_INFINITY ));
20 if (typeof Number['POSITIVE_INFINITY'] !== "number") throw new Test262Error('#10: typeof Number["POSITIVE_INFINITY"] === "number". Actual: ' + (typeof Number["POSITIVE_INFINITY"] ));
21 if (typeof Number.prototype.toString !== "function") throw new Test262Error('#11: typeof Number.prototype.toString === "function". Actual: ' + (typeof Number.prototype.toString ));
22 if (typeof Number.prototype['toString'] !== "function") throw new Test262Error('#12: typeof Number.prototype["toString"] === "function". Actual: ' + (typeof Number.prototype["toString"] ));
23 if (typeof Number.prototype.constructor !== "function") throw new Test262Error('#13: typeof Number.prototype.constructor === "function". Actual: ' + (typeof Number.prototype.constructor ));
24 if (typeof Number.prototype['constructor'] !== "function") throw new Test262Error('#14: typeof Number.prototype["constructor"] === "function". Actual: ' + (typeof Number.prototype["constructor"] ));
25 if (typeof Number.prototype.valueOf !== "function") throw new Test262Error('#15: typeof Number.prototype.valueOf === "function". Actual: ' + (typeof Number.prototype.valueOf ));
26 if (typeof Number.prototype['valueOf'] !== "function") throw new Test262Error('#16: typeof Number.prototype["valueOf"] === "function". Actual: ' + (typeof Number.prototype["valueOf"] ));
27
28 reportCompare(0, 0);