S9.3_A2_T2.js (537B)
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: Result of number conversion from null value is +0 6 es5id: 9.3_A2_T2 7 description: null convert to Number by implicit transformation 8 ---*/ 9 10 // CHECK #1 11 if (+(null) !== 0) { 12 throw new Test262Error('#1.1: +(null) === 0. Actual: ' + (+(null))); 13 } else { 14 if (1/+(null) !== Number.POSITIVE_INFINITY) { 15 throw new Test262Error('#1.2: +(null) === +0. Actual: -0'); 16 } 17 } 18 19 reportCompare(0, 0);