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

Unified Diff: test/mjsunit/es6/destructuring.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 | « test/mjsunit/es6/default-parameters.js ('k') | test/mjsunit/es6/generator-destructuring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/destructuring.js
diff --git a/test/mjsunit/es6/destructuring.js b/test/mjsunit/es6/destructuring.js
index 1f16c45270a9574d22f60865fbe1ca0377eb40e3..a4f88844d462b60b2d8e57b798f0bc6f304aae57 100644
--- a/test/mjsunit/es6/destructuring.js
+++ b/test/mjsunit/es6/destructuring.js
@@ -1045,9 +1045,9 @@
function f20({x}) { function x() { return 2 }; return x(); }
assertEquals(2, f20({x: 1}));
- // Function hoisting is blocked by the conflicting x declaration
- function f21({x}) { { function x() { return 2 } } return x(); }
- assertThrows(() => f21({x: 1}), TypeError);
+ // Annex B 3.3 function hoisting is blocked by the conflicting x declaration
+ function f21({x}) { { function x() { return 2 } } return x; }
+ assertEquals(1, f21({x: 1}));
var g1 = ({x}) => { var x = 2; return x };
assertEquals(2, g1({x: 1}));
@@ -1082,15 +1082,15 @@
var g21 = ({x}) => { { function x() { return 2 } } return x(); }
assertThrows(() => g21({x: 1}), TypeError);
- assertThrows("'use strict'; function f(x) { let x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; function f({x}) { let x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; function f(x) { const x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; function f({x}) { const x = 0; }; f({});", SyntaxError);
+ assertThrows("'use strict'; function f(x) { let x = 0; }", SyntaxError);
+ assertThrows("'use strict'; function f({x}) { let x = 0; }", SyntaxError);
+ assertThrows("'use strict'; function f(x) { const x = 0; }", SyntaxError);
+ assertThrows("'use strict'; function f({x}) { const x = 0; }", SyntaxError);
- assertThrows("'use strict'; let g = (x) => { let x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; let g = ({x}) => { let x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; let g = (x) => { const x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; let g = ({x}) => { const x = 0; }; f({});", SyntaxError);
+ assertThrows("'use strict'; let g = (x) => { let x = 0; }", SyntaxError);
+ assertThrows("'use strict'; let g = ({x}) => { let x = 0; }", SyntaxError);
+ assertThrows("'use strict'; let g = (x) => { const x = 0; }", SyntaxError);
+ assertThrows("'use strict'; let g = ({x}) => { const x = 0; }", SyntaxError);
}());
« no previous file with comments | « test/mjsunit/es6/default-parameters.js ('k') | test/mjsunit/es6/generator-destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698