15.1.2.2, parseInt()

Paul Ruizendaal pnr at planet.nl
Thu Apr 25 14:13:34 PDT 2013


I'm finding bugs in my implementation that were not flagged by test262. I'm posting the corresponding tests because they are directly linked to the spec.

/* test step 4-5 for prefix numbers */
function testcase() {
  if( parseInt('+0x10')!==16 ) return false;
  if( parseInt('-0x10')!==-16 ) return false;
  return true;
}

/* test step 8.b */
function testcase() {
  if( parseInt('0x10', 8)!==0 ) return false;
  return true;
}



More information about the test262-discuss mailing list