Wed, 31 Dec 2014 07:53:36 +0100
Correct small whitespace inconsistency, lost while renaming variables.
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * Result of number conversion from undefined value is NaN
6 *
7 * @path ch09/9.3/S9.3_A1_T1.js
8 * @description Undefined convert to Number by explicit transformation
9 */
11 // CHECK#1
12 if (isNaN(Number(undefined)) !== true) {
13 $ERROR('#1: Number(undefined) === Not-a-Number. Actual: ' + (Number(undefined)));
14 }
16 // CHECK#2
17 if (isNaN(Number(void 0)) !== true) {
18 $ERROR('#2: Number(void 0) === Not-a-Number. Actual: ' + (Number(void 0)));
19 }
21 // CHECK#3
22 if (isNaN(Number(eval("var x"))) !== true) {
23 $ERROR('#3: Number(eval("var x")) === Not-a-Number. Actual: ' + (Number(eval("var x"))));
24 }