aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik_converted/11_Expressions/11.2_Left_Hand_Side_Expressions/11.2.1_Property_Accessors/S11.2.1_A4_T7.js
blob: dc902d1227f88828da710ce29564c549313c986b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
* @name: S11.2.1_A4_T7;
* @section: 11.2.1;
* @assertion: Check type of various properties;
* @description: Checking properties of the Number object;
*/


// Converted for Test262 from original Sputnik source

ES5Harness.registerTest( {
id: "S11.2.1_A4_T7",

path: "TestCases/11_Expressions/11.2_Left_Hand_Side_Expressions/11.2.1_Property_Accessors/S11.2.1_A4_T7.js",

assertion: "Check type of various properties",

description: "Checking properties of the Number object",

test: function testcase() {
   //CHECK#1-16
if (typeof Number.MAX_VALUE  !== "number")  $ERROR('#1: typeof Number.MAX_VALUE === "number". Actual: ' + (typeof Number.MAX_VALUE ));
if (typeof Number['MAX_VALUE'] !== "number")  $ERROR('#2: typeof Number["MAX_VALUE"] === "number". Actual: ' + (typeof Number["MAX_VALUE"] ));
if (typeof Number.MIN_VALUE !== "number")  $ERROR('#3: typeof Number.MIN_VALUE === "number". Actual: ' + (typeof Number.MIN_VALUE ));
if (typeof Number['MIN_VALUE'] !== "number")  $ERROR('#4: typeof Number["MIN_VALUE"] === "number". Actual: ' + (typeof Number["MIN_VALUE"] ));
if (typeof Number.NaN !== "number")  $ERROR('#5: typeof Number.NaN === "number". Actual: ' + (typeof Number.NaN ));
if (typeof Number['NaN'] !== "number")  $ERROR('#6: typeof Number["NaN"] === "number". Actual: ' + (typeof Number["NaN"] ));
if (typeof Number.NEGATIVE_INFINITY !== "number")  $ERROR('#7: typeof Number.NEGATIVE_INFINITY === "number". Actual: ' + (typeof Number.NEGATIVE_INFINITY ));
if (typeof Number['NEGATIVE_INFINITY'] !== "number")  $ERROR('#8: typeof Number["NEGATIVE_INFINITY"] === "number". Actual: ' + (typeof Number["NEGATIVE_INFINITY"] ));
if (typeof Number.POSITIVE_INFINITY !== "number")  $ERROR('#9: typeof Number.POSITIVE_INFINITY === "number". Actual: ' + (typeof Number.POSITIVE_INFINITY ));
if (typeof Number['POSITIVE_INFINITY'] !== "number")  $ERROR('#10: typeof Number["POSITIVE_INFINITY"] === "number". Actual: ' + (typeof Number["POSITIVE_INFINITY"] ));
if (typeof Number.prototype.toString  !== "function")  $ERROR('#11: typeof Number.prototype.toString === "function". Actual: ' + (typeof Number.prototype.toString ));
if (typeof Number.prototype['toString']  !== "function")  $ERROR('#12: typeof Number.prototype["toString"] === "function". Actual: ' + (typeof Number.prototype["toString"] ));
if (typeof Number.prototype.constructor !== "function")  $ERROR('#13: typeof Number.prototype.constructor === "function". Actual: ' + (typeof Number.prototype.constructor ));
if (typeof Number.prototype['constructor'] !== "function")  $ERROR('#14: typeof Number.prototype["constructor"] === "function". Actual: ' + (typeof Number.prototype["constructor"] ));
if (typeof Number.prototype.valueOf  !== "function")  $ERROR('#15: typeof Number.prototype.valueOf === "function". Actual: ' + (typeof Number.prototype.valueOf ));
if (typeof Number.prototype['valueOf']  !== "function")  $ERROR('#16: typeof Number.prototype["valueOf"] === "function". Actual: ' + (typeof Number.prototype["valueOf"] ));



 }
});