Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: test/mjsunit/array-splice.js

Issue 12729014: Fix bogus right-shifts in Array tests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/array-unshift.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | test/mjsunit/array-unshift.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698