S9.2_A4_T1.js (616B)
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: | 6 Result of boolean conversion from number value is false if the argument 7 is +0, -0, or NaN; otherwise, is true 8 esid: sec-toboolean 9 description: +0, -0 and NaN convert to Boolean by explicit transformation 10 ---*/ 11 assert.sameValue(Boolean(+0), false, 'Boolean(+0) must return false'); 12 assert.sameValue(Boolean(-0), false, 'Boolean(-0) must return false'); 13 assert.sameValue(Boolean(Number.NaN), false, 'Boolean(Number.NaN) must return false'); 14 15 reportCompare(0, 0);