|
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 * Check type of various properties |
|
6 * |
|
7 * @path ch11/11.2/11.2.1/S11.2.1_A4_T7.js |
|
8 * @description Checking properties of the Number object |
|
9 */ |
|
10 |
|
11 //CHECK#1-16 |
|
12 if (typeof Number.MAX_VALUE !== "number") $ERROR('#1: typeof Number.MAX_VALUE === "number". Actual: ' + (typeof Number.MAX_VALUE )); |
|
13 if (typeof Number['MAX_VALUE'] !== "number") $ERROR('#2: typeof Number["MAX_VALUE"] === "number". Actual: ' + (typeof Number["MAX_VALUE"] )); |
|
14 if (typeof Number.MIN_VALUE !== "number") $ERROR('#3: typeof Number.MIN_VALUE === "number". Actual: ' + (typeof Number.MIN_VALUE )); |
|
15 if (typeof Number['MIN_VALUE'] !== "number") $ERROR('#4: typeof Number["MIN_VALUE"] === "number". Actual: ' + (typeof Number["MIN_VALUE"] )); |
|
16 if (typeof Number.NaN !== "number") $ERROR('#5: typeof Number.NaN === "number". Actual: ' + (typeof Number.NaN )); |
|
17 if (typeof Number['NaN'] !== "number") $ERROR('#6: typeof Number["NaN"] === "number". Actual: ' + (typeof Number["NaN"] )); |
|
18 if (typeof Number.NEGATIVE_INFINITY !== "number") $ERROR('#7: typeof Number.NEGATIVE_INFINITY === "number". Actual: ' + (typeof Number.NEGATIVE_INFINITY )); |
|
19 if (typeof Number['NEGATIVE_INFINITY'] !== "number") $ERROR('#8: typeof Number["NEGATIVE_INFINITY"] === "number". Actual: ' + (typeof Number["NEGATIVE_INFINITY"] )); |
|
20 if (typeof Number.POSITIVE_INFINITY !== "number") $ERROR('#9: typeof Number.POSITIVE_INFINITY === "number". Actual: ' + (typeof Number.POSITIVE_INFINITY )); |
|
21 if (typeof Number['POSITIVE_INFINITY'] !== "number") $ERROR('#10: typeof Number["POSITIVE_INFINITY"] === "number". Actual: ' + (typeof Number["POSITIVE_INFINITY"] )); |
|
22 if (typeof Number.prototype.toString !== "function") $ERROR('#11: typeof Number.prototype.toString === "function". Actual: ' + (typeof Number.prototype.toString )); |
|
23 if (typeof Number.prototype['toString'] !== "function") $ERROR('#12: typeof Number.prototype["toString"] === "function". Actual: ' + (typeof Number.prototype["toString"] )); |
|
24 if (typeof Number.prototype.constructor !== "function") $ERROR('#13: typeof Number.prototype.constructor === "function". Actual: ' + (typeof Number.prototype.constructor )); |
|
25 if (typeof Number.prototype['constructor'] !== "function") $ERROR('#14: typeof Number.prototype["constructor"] === "function". Actual: ' + (typeof Number.prototype["constructor"] )); |
|
26 if (typeof Number.prototype.valueOf !== "function") $ERROR('#15: typeof Number.prototype.valueOf === "function". Actual: ' + (typeof Number.prototype.valueOf )); |
|
27 if (typeof Number.prototype['valueOf'] !== "function") $ERROR('#16: typeof Number.prototype["valueOf"] === "function". Actual: ' + (typeof Number.prototype["valueOf"] )); |
|
28 |
|
29 |
|
30 |