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

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

Issue 669075: Fix a special case (zero length result array). (Closed)
Patch Set: Addressing Vitaly's concerns Created 10 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 | « test/mjsunit/array-slice.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.js
diff --git a/test/mjsunit/array-splice.js b/test/mjsunit/array-splice.js
index 6501ba4e8572e7d88997ec74d07d9614dbd68e5c..bd471eceb6e9f25c3d6a5b4d8701cc68651cf7fb 100644
--- a/test/mjsunit/array-splice.js
+++ b/test/mjsunit/array-splice.js
@@ -42,6 +42,17 @@
})();
+// Check various variants of empty array's splicing.
+(function() {
+ for (var i = 0; i < 7; i++) {
+ assertEquals([], [].splice(0, 0));
+ assertEquals([], [].splice(1, 0));
+ assertEquals([], [].splice(0, 1));
+ assertEquals([], [].splice(-1, 0));
+ }
+})();
+
+
// Check various forms of arguments omission.
(function() {
var array;
« no previous file with comments | « test/mjsunit/array-slice.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698