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

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

Issue 6034003: Teach C++ ArraySlice builtin to deal with arguments object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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 | « src/builtins.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-slice.js
diff --git a/test/mjsunit/array-slice.js b/test/mjsunit/array-slice.js
index 8f9ce5358622bb83a5b9c402f360194373df789c..50b5b273064d731523414c03d6d1cd9609e687dd 100644
--- a/test/mjsunit/array-slice.js
+++ b/test/mjsunit/array-slice.js
@@ -218,3 +218,16 @@
assertTrue(delete Array.prototype[5]);
}
})();
+
+// Check slicing on arguments object.
+(function() {
+ function func(expected, a0, a1, a2) {
+ assertEquals(expected, Array.prototype.slice.call(arguments, 1));
+ }
+
+ func([]);
+ func(['a'], 'a');
+ func(['a', 1], 'a', 1);
+ func(['a', 1, undefined], 'a', 1, undefined);
+ func(['a', 1, undefined, void(0)], 'a', 1, undefined, void(0));
+})();
« no previous file with comments | « src/builtins.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698