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

Unified Diff: test/mjsunit/harmony/block-let-declaration.js

Issue 964063003: Fix test for function declarations syntax error. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/block-let-declaration.js
diff --git a/test/mjsunit/harmony/block-let-declaration.js b/test/mjsunit/harmony/block-let-declaration.js
index 44a0049a44e3d7dc137e407c6e0f2c45de284600..b13cc6a9e73c0a456e76cd9de17493857e1faf8b 100644
--- a/test/mjsunit/harmony/block-let-declaration.js
+++ b/test/mjsunit/harmony/block-let-declaration.js
@@ -149,11 +149,11 @@ function f() {
f();
// Test function declarations in statement position in strict mode.
-TestLocalThrows("function f() { if (true) function g() {}", SyntaxError);
-TestLocalThrows("function f() { if (true) {} else function g() {}", SyntaxError);
-TestLocalThrows("function f() { do function g() {} while (false)", SyntaxError);
-TestLocalThrows("function f() { while (false) function g() {}", SyntaxError);
-TestLocalThrows("function f() { label: function g() {}", SyntaxError);
-TestLocalThrows("function f() { for (;false;) function g() {}", SyntaxError);
-TestLocalThrows("function f() { switch (true) { case true: function g() {} }", SyntaxError);
-TestLocalThrows("function f() { switch (true) { default: function g() {} }", SyntaxError);
+TestLocalThrows("function f() { if (true) function g() {} }", SyntaxError);
arv (Not doing code reviews) 2015/03/03 16:17:31 It would be nice if these were changed into test/m
Dmitry Lomov (no reviews) 2015/03/03 16:36:18 That would be awesome but unfortunately not practi
+TestLocalThrows("function f() { if (true) {} else function g() {} }", SyntaxError);
+TestLocalThrows("function f() { do function g() {} while (false) }", SyntaxError);
+TestLocalThrows("function f() { while (false) function g() {} }", SyntaxError);
+TestLocalThrows("function f() { label: function g() {} }", SyntaxError);
rossberg 2015/03/04 10:42:14 Oh wait. Actually this one shouldn't be a syntax e
Dmitry Lomov (no reviews) 2015/03/13 14:33:20 We can make it a syntax error since we are free to
+TestLocalThrows("function f() { for (;false;) function g() {} }", SyntaxError);
+TestLocalThrows("function f() { switch (true) { case true: function g() {} } }", SyntaxError);
rossberg 2015/03/04 10:42:14 Neither the last two.
+TestLocalThrows("function f() { switch (true) { default: function g() {} } }", SyntaxError);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698