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

Side by Side 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, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 function h1() { } 142 function h1() { }
143 } 143 }
144 } 144 }
145 { 145 {
146 function g1() { } 146 function g1() { }
147 } 147 }
148 } 148 }
149 f(); 149 f();
150 150
151 // Test function declarations in statement position in strict mode. 151 // Test function declarations in statement position in strict mode.
152 TestLocalThrows("function f() { if (true) function g() {}", SyntaxError); 152 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
153 TestLocalThrows("function f() { if (true) {} else function g() {}", SyntaxError) ; 153 TestLocalThrows("function f() { if (true) {} else function g() {} }", SyntaxErro r);
154 TestLocalThrows("function f() { do function g() {} while (false)", SyntaxError); 154 TestLocalThrows("function f() { do function g() {} while (false) }", SyntaxError );
155 TestLocalThrows("function f() { while (false) function g() {}", SyntaxError); 155 TestLocalThrows("function f() { while (false) function g() {} }", SyntaxError);
156 TestLocalThrows("function f() { label: function g() {}", SyntaxError); 156 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
157 TestLocalThrows("function f() { for (;false;) function g() {}", SyntaxError); 157 TestLocalThrows("function f() { for (;false;) function g() {} }", SyntaxError);
158 TestLocalThrows("function f() { switch (true) { case true: function g() {} }", S yntaxError); 158 TestLocalThrows("function f() { switch (true) { case true: function g() {} } }", SyntaxError);
rossberg 2015/03/04 10:42:14 Neither the last two.
159 TestLocalThrows("function f() { switch (true) { default: function g() {} }", Syn taxError); 159 TestLocalThrows("function f() { switch (true) { default: function g() {} } }", S yntaxError);
OLDNEW
« 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