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

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

Issue 2229243002: Destructuring/default tests for generators and async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add additional suggested test Created 4 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 | « no previous file | test/mjsunit/es6/destructuring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/default-parameters.js
diff --git a/test/mjsunit/es6/default-parameters.js b/test/mjsunit/es6/default-parameters.js
index 4e0bf542ef5292568d7bd28f5e85ffe3554d1929..c0fe031c039b76f0c83558c45e28e55b7672bc3e 100644
--- a/test/mjsunit/es6/default-parameters.js
+++ b/test/mjsunit/es6/default-parameters.js
@@ -350,14 +350,15 @@
(function TestDirectiveThrows() {
"use strict";
- assertThrows(function(){ eval("function(x=1){'use strict';}") }, SyntaxError);
- assertThrows(function(){ eval("(x=1) => {'use strict';}") }, SyntaxError);
- assertThrows(
- function(){ eval("(class{foo(x=1) {'use strict';}});") }, SyntaxError);
-
- assertThrows(
- function(){ eval("function(a, x=1){'use strict';}") }, SyntaxError);
- assertThrows(function(){ eval("(a, x=1) => {'use strict';}") }, SyntaxError);
- assertThrows(
- function(){ eval("(class{foo(a, x=1) {'use strict';}});") }, SyntaxError);
+ assertThrows("(function(x=1){'use strict';})", SyntaxError);
+ assertThrows("(x=1) => {'use strict';}", SyntaxError);
+ assertThrows("(class{foo(x=1) {'use strict';}});", SyntaxError);
+
+ assertThrows("(function(a, x=1){'use strict';})", SyntaxError);
+ assertThrows("(a, x=1) => {'use strict';}", SyntaxError);
+ assertThrows("(class{foo(a, x=1) {'use strict';}});", SyntaxError);
+
+ assertThrows("(function({x}){'use strict';})", SyntaxError);
+ assertThrows("({x}) => {'use strict';}", SyntaxError);
+ assertThrows("(class{foo({x}) {'use strict';}});", SyntaxError);
})();
« no previous file with comments | « no previous file | test/mjsunit/es6/destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698