S15.1.2.2_A7.1_T2.js (635B)
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: If Z is empty, return NaN 6 esid: sec-parseint-string-radix 7 description: x is not a radix-R digit 8 ---*/ 9 10 assert.sameValue(parseInt("$0x"), NaN, 'parseInt("$0x") must return NaN'); 11 assert.sameValue(parseInt("$0X"), NaN, 'parseInt("$0X") must return NaN'); 12 assert.sameValue(parseInt("$$$"), NaN, 'parseInt("$$$") must return NaN'); 13 assert.sameValue(parseInt(""), NaN, 'parseInt("") must return NaN'); 14 assert.sameValue(parseInt(" "), NaN, 'parseInt(" ") must return NaN'); 15 16 reportCompare(0, 0);