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

Unified Diff: test/mjsunit/harmony/destructuring.js

Issue 1416753009: [parser] early error when declaration Pattern missing Initializer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« src/preparser.cc ('K') | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/destructuring.js
diff --git a/test/mjsunit/harmony/destructuring.js b/test/mjsunit/harmony/destructuring.js
index 92cd7762604f17f0012efe793b4530251dd43b40..cdce636f99dffc378d729d9870936004a13c7e42 100644
--- a/test/mjsunit/harmony/destructuring.js
+++ b/test/mjsunit/harmony/destructuring.js
@@ -1104,6 +1104,10 @@
assertEquals(1, result);
})();
-(function TestDestructuringArrayWithoutInitializer() {
- assertThrows('var [foo]', TypeError);
+(function TestDeclDestructuringArrayWithoutInitializer() {
adamk 2015/11/03 20:13:53 Could you make this and the below into message tes
+ assertThrows('var [foo]', SyntaxError);
+})();
+
+(function TestDeclDestructuringObjectWithoutInitializer() {
+ assertThrows('var {foo}', SyntaxError);
})();
« src/preparser.cc ('K') | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698