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

Side by Side Diff: test/mjsunit/harmony/block-sloppy-function.js

Issue 1450193002: Rename destructuring flag to "--harmony-destructuring-bind" (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 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: --no-legacy-const --harmony-sloppy --harmony-sloppy-let 5 // Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
6 // Flags: --harmony-sloppy-function --harmony-destructuring 6 // Flags: --harmony-sloppy-function --harmony-destructuring-bind
7 // Flags: --harmony-rest-parameters 7 // Flags: --harmony-rest-parameters
8 8
9 // Test Annex B 3.3 semantics for functions declared in blocks in sloppy mode. 9 // Test Annex B 3.3 semantics for functions declared in blocks in sloppy mode.
10 // http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-decl arations-web-legacy-compatibility-semantics 10 // http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-decl arations-web-legacy-compatibility-semantics
11 11
12 (function overridingLocalFunction() { 12 (function overridingLocalFunction() {
13 var x = []; 13 var x = [];
14 assertEquals('function', typeof f); 14 assertEquals('function', typeof f);
15 function f() { 15 function f() {
16 x.push(1); 16 x.push(1);
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 throws = false; 293 throws = false;
294 try { 294 try {
295 eval('{ function hoistWhenFrozen() {} }'); 295 eval('{ function hoistWhenFrozen() {} }');
296 } catch (e) { 296 } catch (e) {
297 throws = true; 297 throws = true;
298 } 298 }
299 assertFalse(this.hasOwnProperty("hoistWhenFrozen")); 299 assertFalse(this.hasOwnProperty("hoistWhenFrozen"));
300 assertThrows(() => hoistWhenFrozen, ReferenceError); 300 assertThrows(() => hoistWhenFrozen, ReferenceError);
301 // Should be assertFalse BUG(v8:4452) 301 // Should be assertFalse BUG(v8:4452)
302 assertTrue(throws); 302 assertTrue(throws);
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/block-let-contextual-sloppy.js ('k') | test/mjsunit/harmony/default-parameters-destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698