blob: e7ddff3ab7708b9e9c10e5d754a9abbd727eb413 (
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
|
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S8.5_A7;
* @section: 8.5, 7.8.3;
* @assertion: +Infinity expression has a type Number;
* @description: Check type of +Infinity;
*/
// Converted for Test262 from original Sputnik source
ES5Harness.registerTest( {
id: "S8.5_A7",
path: "TestCases/08_Types/8.5_The_Number_Type/S8.5_A7.js",
assertion: "+Infinity expression has a type Number",
description: "Check type of +Infinity",
test: function testcase() {
var x=+Infinity;
///////////////////////////////////////////////////////
// CHECK#1
if (typeof(x) !== "number"){
$ERROR('#1: var x=+Infinity; typeof(x) === "number". Actual: ' + (typeof(x)));
}
//
//////////////////////////////////////////////////////////
///////////////////////////////////////////////////////
// CHECK#2
if (typeof(+Infinity) !== "number"){
$ERROR('#2: typeof(+Infinity) === "number". Actual: ' + (typeof(+Infinity)));
}
//
//////////////////////////////////////////////////////////
}
});
|