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

Side by Side Diff: test/mjsunit/strong/undefined.js

Issue 1373633002: Remove --harmony-arrow-functions flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 2 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 | « test/mjsunit/strong/mutually-recursive-classes.js ('k') | test/mjsunit/this-dynamic-lookup.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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: --strong-mode --harmony-sloppy --harmony-arrow-functions 5 // Flags: --strong-mode --harmony-sloppy
6 6
7 // Repurposing the strict mode 'eval' and 'arguments' tests to test for correct 7 // Repurposing the strict mode 'eval' and 'arguments' tests to test for correct
8 // behaviour of 'undefined' as an identifier in strong mode. 8 // behaviour of 'undefined' as an identifier in strong mode.
9 "use strict"; 9 "use strict";
10 10
11 function CheckStrongMode(code) { 11 function CheckStrongMode(code) {
12 let strictContexts = [ 12 let strictContexts = [
13 ["'use strict';", ""], 13 ["'use strict';", ""],
14 ["function outer() { 'use strict';", "}"], 14 ["function outer() { 'use strict';", "}"],
15 ["function outer() { 'use strict'; function inner() {", "}}"], 15 ["function outer() { 'use strict'; function inner() {", "}}"],
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 assertThrows("(undefined => {'use strong';});"); 191 assertThrows("(undefined => {'use strong';});");
192 192
193 CheckStrongMode("((undefined, b, c) => {return});"); 193 CheckStrongMode("((undefined, b, c) => {return});");
194 assertThrows("((undefined, b, c) => {'use strong';});"); 194 assertThrows("((undefined, b, c) => {'use strong';});");
195 195
196 CheckStrongMode("((a, undefined, c) => {return});"); 196 CheckStrongMode("((a, undefined, c) => {return});");
197 assertThrows("((a, undefined, c) => {'use strong';});"); 197 assertThrows("((a, undefined, c) => {'use strong';});");
198 198
199 CheckStrongMode("((a, b, undefined) => {return});"); 199 CheckStrongMode("((a, b, undefined) => {return});");
200 assertThrows("((a, b, undefined) => {'use strong';});"); 200 assertThrows("((a, b, undefined) => {'use strong';});");
OLDNEW
« no previous file with comments | « test/mjsunit/strong/mutually-recursive-classes.js ('k') | test/mjsunit/this-dynamic-lookup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698