 Chromium Code Reviews
 Chromium Code Reviews Issue 12729014:
  Fix bogus right-shifts in Array tests  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 12729014:
  Fix bogus right-shifts in Array tests  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| Index: test/mjsunit/array-splice.js | 
| diff --git a/test/mjsunit/array-splice.js b/test/mjsunit/array-splice.js | 
| index 0e307b5d3d8a28b4055a76ec49b9d1f4ac71ecae..be2b1064e6a12f49d00e713a42b126a4eb45c485 100644 | 
| --- a/test/mjsunit/array-splice.js | 
| +++ b/test/mjsunit/array-splice.js | 
| @@ -285,8 +285,8 @@ | 
| assertFalse(array.hasOwnProperty(15), "array.hasOwnProperty(15)"); | 
| assertFalse(array.hasOwnProperty(31), "array.hasOwnProperty(31)"); | 
| assertFalse(array.hasOwnProperty(63), "array.hasOwnProperty(63)"); | 
| - assertFalse(array.hasOwnProperty(2 << 32 - 1), | 
| - "array.hasOwnProperty(2 << 31 - 1)"); | 
| + assertFalse(array.hasOwnProperty(Math.pow(2, 32) - 2), | 
| 
adamk
2013/03/21 22:22:37
Wasn't sure what these were supposed to be, happy
 | 
| + "array.hasOwnProperty(Math.pow(2, 32) - 2)"); | 
| } | 
| })(); | 
| @@ -333,8 +333,8 @@ | 
| assertFalse(array.hasOwnProperty(15), "array.hasOwnProperty(15)"); | 
| assertFalse(array.hasOwnProperty(31), "array.hasOwnProperty(31)"); | 
| assertFalse(array.hasOwnProperty(63), "array.hasOwnProperty(63)"); | 
| - assertFalse(array.hasOwnProperty(2 << 32 - 1), | 
| - "array.hasOwnProperty(2 << 31 - 1)"); | 
| + assertFalse(array.hasOwnProperty(Math.pow(2, 32) - 2), | 
| + "array.hasOwnProperty(Math.pow(2, 32) - 2)"); | 
| } | 
| })(); | 
| @@ -357,7 +357,7 @@ | 
| (function() { | 
| for (var i = 0; i < 7; i++) { | 
| try { | 
| - new Array((1 << 32) - 3).splice(-1, 0, 1, 2, 3, 4, 5); | 
| + new Array(Math.pow(2, 32) - 3).splice(-1, 0, 1, 2, 3, 4, 5); | 
| throw 'Should have thrown RangeError'; | 
| } catch (e) { | 
| assertTrue(e instanceof RangeError); |