S15.1.2.2_A4.1_T2.js (1930B)
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 R = 0 or R = undefined, then R = 10 6 esid: sec-parseint-string-radix 7 description: R = undefined 8 ---*/ 9 10 assert.sameValue(parseInt("0"), parseInt("0", 10), 'parseInt("0") must return the same value returned by parseInt("0", 10)'); 11 assert.sameValue(parseInt("1"), parseInt("1", 10), 'parseInt("1") must return the same value returned by parseInt("1", 10)'); 12 assert.sameValue(parseInt("2"), parseInt("2", 10), 'parseInt("2") must return the same value returned by parseInt("2", 10)'); 13 assert.sameValue(parseInt("3"), parseInt("3", 10), 'parseInt("3") must return the same value returned by parseInt("3", 10)'); 14 assert.sameValue(parseInt("4"), parseInt("4", 10), 'parseInt("4") must return the same value returned by parseInt("4", 10)'); 15 assert.sameValue(parseInt("5"), parseInt("5", 10), 'parseInt("5") must return the same value returned by parseInt("5", 10)'); 16 assert.sameValue(parseInt("6"), parseInt("6", 10), 'parseInt("6") must return the same value returned by parseInt("6", 10)'); 17 assert.sameValue(parseInt("7"), parseInt("7", 10), 'parseInt("7") must return the same value returned by parseInt("7", 10)'); 18 assert.sameValue(parseInt("8"), parseInt("8", 10), 'parseInt("8") must return the same value returned by parseInt("8", 10)'); 19 assert.sameValue(parseInt("9"), parseInt("9", 10), 'parseInt("9") must return the same value returned by parseInt("9", 10)'); 20 assert.sameValue(parseInt("10"), parseInt("10", 10), 'parseInt("10") must return the same value returned by parseInt("10", 10)'); 21 assert.sameValue(parseInt("11"), parseInt("11", 10), 'parseInt("11") must return the same value returned by parseInt("11", 10)'); 22 assert.sameValue(parseInt("9999"), parseInt("9999", 10), 'parseInt("9999") must return the same value returned by parseInt("9999", 10)'); 23 24 reportCompare(0, 0);