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

Unified Diff: test/mjsunit/sparse-array-reverse.js

Issue 40164: Speed up a few tests that were taking too long. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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/try.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/sparse-array-reverse.js
===================================================================
--- test/mjsunit/sparse-array-reverse.js (revision 1427)
+++ test/mjsunit/sparse-array-reverse.js (working copy)
@@ -74,7 +74,15 @@
var to_delete = [];
- var a = new Array(size);
+ var a;
+ // Make sure we test both array-backed and hash-table backed
+ // arrays.
+ if (size < 1000) {
+ a = new Array(size);
+ } else {
+ a = new Array();
+ a.length = size;
+ }
var expected = '';
var expected_reversed = '';
« no previous file with comments | « no previous file | test/mjsunit/try.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698