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

Unified Diff: test/mjsunit/harmony/default-parameters.js

Issue 1311163002: [es6] Correct length for functions with default parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment Created 5 years, 4 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 | « src/scopes.cc ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/default-parameters.js
diff --git a/test/mjsunit/harmony/default-parameters.js b/test/mjsunit/harmony/default-parameters.js
index 3be5916d9bf5553265889489f2b143b51cdc2928..0d87b0371217876779656f6a32568c065cecd365 100644
--- a/test/mjsunit/harmony/default-parameters.js
+++ b/test/mjsunit/harmony/default-parameters.js
@@ -418,15 +418,14 @@
(function TestFunctionLength() {
- // TODO(rossberg): Fix arity.
- // assertEquals(0, (function(x = 1) {}).length);
- // assertEquals(0, (function(x = 1, ...a) {}).length);
- // assertEquals(1, (function(x, y = 1) {}).length);
- // assertEquals(1, (function(x, y = 1, ...a) {}).length);
- // assertEquals(2, (function(x, y, z = 1) {}).length);
- // assertEquals(2, (function(x, y, z = 1, ...a) {}).length);
- // assertEquals(1, (function(x, y = 1, z) {}).length);
- // assertEquals(1, (function(x, y = 1, z, ...a) {}).length);
- // assertEquals(1, (function(x, y = 1, z, v = 2) {}).length);
- // assertEquals(1, (function(x, y = 1, z, v = 2, ...a) {}).length);
+ assertEquals(0, (function(x = 1) {}).length);
+ assertEquals(0, (function(x = 1, ...a) {}).length);
+ assertEquals(1, (function(x, y = 1) {}).length);
+ assertEquals(1, (function(x, y = 1, ...a) {}).length);
+ assertEquals(2, (function(x, y, z = 1) {}).length);
+ assertEquals(2, (function(x, y, z = 1, ...a) {}).length);
+ assertEquals(1, (function(x, y = 1, z) {}).length);
+ assertEquals(1, (function(x, y = 1, z, ...a) {}).length);
+ assertEquals(1, (function(x, y = 1, z, v = 2) {}).length);
+ assertEquals(1, (function(x, y = 1, z, v = 2, ...a) {}).length);
})();
« no previous file with comments | « src/scopes.cc ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698