S15.1.2.2_A1_T5.js (660B)
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: Operator use ToString 6 esid: sec-parseint-string-radix 7 description: Checking for Number object 8 ---*/ 9 10 assert.sameValue(parseInt(new Number(-1)), parseInt("-1"), 'parseInt(new Number(-1)) must return the same value returned by parseInt("-1")'); 11 12 assert.sameValue( 13 String(parseInt(new Number(Infinity))), 14 "NaN", 15 'String(parseInt(new Number(Infinity))) must return "NaN"' 16 ); 17 18 assert.sameValue(String(parseInt(new Number(NaN))), "NaN", 'String(parseInt(new Number(NaN))) must return "NaN"'); 19 20 reportCompare(0, 0);