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

Unified Diff: test/mjsunit/harmony/arrow-functions-lexical-arguments.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, 3 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 | « test/mjsunit/harmony/arrow-functions.js ('k') | test/mjsunit/harmony/arrow-functions-this.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/arrow-functions-lexical-arguments.js
diff --git a/test/mjsunit/harmony/arrow-functions-lexical-arguments.js b/test/mjsunit/harmony/arrow-functions-lexical-arguments.js
deleted file mode 100644
index b2498d78dcdb3acad4086b94935cb42ab357a66d..0000000000000000000000000000000000000000
--- a/test/mjsunit/harmony/arrow-functions-lexical-arguments.js
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --harmony-arrow-functions
-
-
-(function testInFunctionDeclaration() {
- var calls = 0;
- function f() {
- (() => {
- calls++;
- assertEquals(2, arguments.length);
- assertEquals('a', arguments[0]);
- assertEquals('b', arguments[1]);
- })();
- }
- f('a', 'b');
- assertEquals(1, calls);
-
- calls = 0;
- new f('a', 'b');
- assertEquals(1, calls);
-})();
-
-
-(function testInFunctionExpression() {
- var calls = 0;
- var f = function() {
- (() => {
- calls++;
- assertEquals(2, arguments.length);
- assertEquals('a', arguments[0]);
- assertEquals('b', arguments[1]);
- })();
- }
- f('a', 'b');
- assertEquals(1, calls);
-})();
-
-
-(function testInConstructor() {
- 'use strict';
-
- var calls = 0;
- class C {
- constructor() {
- (() => {
- calls++;
- assertEquals(2, arguments.length);
- assertEquals('a', arguments[0]);
- assertEquals('b', arguments[1]);
- })();
- }
- }
- new C('a', 'b');
- assertEquals(1, calls);
-})();
-
-
-(function testInSetter() {
- 'use strict';
-
- var calls = 0;
- var o = {
- set x(_) {
- (() => {
- calls++;
- assertEquals(1, arguments.length);
- assertEquals('a', arguments[0]);
- })();
- }
- }
- o.x = 'a';
- assertEquals(1, calls);
-})();
-
-
-(function testMappedArguments() {
- var calls = 0;
- function f(x) {
- x = 'c';
- (() => {
- calls++;
- assertEquals(2, arguments.length);
- assertEquals('c', arguments[0]);
- x = 'a';
- assertEquals('a', arguments[0]);
- assertEquals('b', arguments[1]);
- })();
- }
- f('a', 'b');
- assertEquals(1, calls);
-})();
-
-
-(function testUnMappedArguments() {
- 'use strict';
-
- var calls = 0;
- function f(x) {
- x = 'c';
- (() => {
- calls++;
- assertEquals(2, arguments.length);
- assertEquals('a', arguments[0]);
- assertEquals('b', arguments[1]);
- })();
- }
- f('a', 'b');
- assertEquals(1, calls);
-})();
-
-
-(function testClosure() {
- var calls = 0;
- function f(x) {
- return () => {
- calls++;
- assertEquals(2, arguments.length);
- assertEquals('a', arguments[0]);
- assertEquals('b', arguments[1]);
- };
- }
- f('a', 'b')();
- assertEquals(1, calls);
-})();
-
-
-(function testClosureMappedArguments() {
- var calls = 0;
- function f(x) {
- x = 'c';
- return () => {
- calls++;
- assertEquals(2, arguments.length);
- assertEquals('c', arguments[0]);
- x = 'a';
- assertEquals('a', arguments[0]);
- assertEquals('b', arguments[1]);
- };
- }
- f('a', 'b')();
- assertEquals(1, calls);
-})();
-
-
-(function testParamNamedArguments() {
- var calls = 0;
- function f(arguments) {
- (() => {
- calls++;
- assertEquals('a', arguments);
- })();
- }
- f('a');
- assertEquals(1, calls);
-})();
« no previous file with comments | « test/mjsunit/harmony/arrow-functions.js ('k') | test/mjsunit/harmony/arrow-functions-this.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698