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

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

Issue 63100: Increase coverage testing of sparse arrays. Add a set... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 8 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 | « test/mjsunit/array-shift.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-splice-webkit.js
===================================================================
--- test/mjsunit/array-splice-webkit.js (revision 1704)
+++ test/mjsunit/array-splice-webkit.js (working copy)
@@ -57,4 +57,13 @@
assertArrayEquals(['c'], arr.splice(2, 100))
assertArrayEquals(['a','b'], arr);
+// Verify preservation of the hole while shifting
+arr = ['a','b','c','d','e'];
+assertTrue(3 in arr);
+assertTrue(delete arr[3]);
+assertFalse(3 in arr);
+res = arr.splice(2,2);
+assertArrayEquals(['a','b','e'], arr);
+assertArrayEquals(['c',,], res);
+assertFalse(1 in res);
« no previous file with comments | « test/mjsunit/array-shift.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698