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

Side by Side Diff: test/mjsunit/es6/completion.js

Issue 1858943002: Remove runtime flags for sloppy mode block scoping features (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-sloppy-let
6
7 5
8 function assertUndef(x) { 6 function assertUndef(x) {
9 assertEquals(undefined, x); 7 assertEquals(undefined, x);
10 } 8 }
11 9
12 10
13 // IfStatement [13.6.7] 11 // IfStatement [13.6.7]
14 12
15 assertUndef(eval('42; if (true) ; else 0;')); // ES5: 42 13 assertUndef(eval('42; if (true) ; else 0;')); // ES5: 42
16 assertUndef(eval('42; if (true) ;')); // ES5: 42 14 assertUndef(eval('42; if (true) ;')); // ES5: 42
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 assertUndef(eval("var x = 1;")); 139 assertUndef(eval("var x = 1;"));
142 assertEquals(1, eval("if (true) { 1; } else { 2; }")); 140 assertEquals(1, eval("if (true) { 1; } else { 2; }"));
143 assertEquals(2, eval("if (false) { 1; } else { 2; }")); 141 assertEquals(2, eval("if (false) { 1; } else { 2; }"));
144 assertUndef(eval("try{1; if (true) { 2; throw ''; } else { 2; }} catch(e){}")); 142 assertUndef(eval("try{1; if (true) { 2; throw ''; } else { 2; }} catch(e){}"));
145 assertEquals(2, eval("1; var i = 0; do { ++i; 2; } while(i!=1);")); 143 assertEquals(2, eval("1; var i = 0; do { ++i; 2; } while(i!=1);"));
146 assertUndef(eval( 144 assertUndef(eval(
147 "try{1; var i = 0; do { ++i; 2; throw ''; } while (i!=1);} catch(e){}")); 145 "try{1; var i = 0; do { ++i; 2; throw ''; } while (i!=1);} catch(e){}"));
148 assertUndef(eval("1; try{2; throwOnReturn();} catch(e){}")); 146 assertUndef(eval("1; try{2; throwOnReturn();} catch(e){}"));
149 assertUndef(eval("1; twoFunc();")); 147 assertUndef(eval("1; twoFunc();"));
150 assertEquals(2, eval("1; with ( { a: 0 } ) { 2; }")); 148 assertEquals(2, eval("1; with ( { a: 0 } ) { 2; }"));
OLDNEW
« no previous file with comments | « test/mjsunit/es6/classes-derived-return-type.js ('k') | test/mjsunit/es6/regress/regress-4482.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698