| OLD | NEW |
| 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-function-name | 5 // Flags: --harmony-function-name |
| 6 // Flags: --harmony-destructuring-bind --harmony-destructuring-assignment | |
| 7 | 6 |
| 8 (function testVariableDeclarationsFunction() { | 7 (function testVariableDeclarationsFunction() { |
| 9 'use strict'; | 8 'use strict'; |
| 10 var a = function(){}; | 9 var a = function(){}; |
| 11 assertEquals('a', a.name); | 10 assertEquals('a', a.name); |
| 12 let b = () => {}; | 11 let b = () => {}; |
| 13 assertEquals('b', b.name); | 12 assertEquals('b', b.name); |
| 14 const c = ((function(){})); | 13 const c = ((function(){})); |
| 15 assertEquals('c', c.name); | 14 assertEquals('c', c.name); |
| 16 | 15 |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 var g = function*() {}; | 363 var g = function*() {}; |
| 365 var obj = { | 364 var obj = { |
| 366 ['h']: function() {}, | 365 ['h']: function() {}, |
| 367 i: () => {} | 366 i: () => {} |
| 368 }; | 367 }; |
| 369 assertEquals('function () {}', f.toString()); | 368 assertEquals('function () {}', f.toString()); |
| 370 assertEquals('function* () {}', g.toString()); | 369 assertEquals('function* () {}', g.toString()); |
| 371 assertEquals('function () {}', obj.h.toString()); | 370 assertEquals('function () {}', obj.h.toString()); |
| 372 assertEquals('() => {}', obj.i.toString()); | 371 assertEquals('() => {}', obj.i.toString()); |
| 373 })(); | 372 })(); |
| OLD | NEW |