| 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 | 6 // Flags: --harmony-destructuring-bind --harmony-destructuring-assignment |
| 7 | 7 |
| 8 (function testVariableDeclarationsFunction() { | 8 (function testVariableDeclarationsFunction() { |
| 9 'use strict'; | 9 'use strict'; |
| 10 var a = function(){}; | 10 var a = function(){}; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 assertEquals('[1]', class1[sym1].name); | 350 assertEquals('[1]', class1[sym1].name); |
| 351 })(); | 351 })(); |
| 352 | 352 |
| 353 | 353 |
| 354 (function testComputedNamesOnlyAppliedSyntactically() { | 354 (function testComputedNamesOnlyAppliedSyntactically() { |
| 355 function factory() { return () => {}; } | 355 function factory() { return () => {}; } |
| 356 | 356 |
| 357 var obj = { ['foo']: factory() }; | 357 var obj = { ['foo']: factory() }; |
| 358 assertEquals('', obj.foo.name); | 358 assertEquals('', obj.foo.name); |
| 359 })(); | 359 })(); |
| 360 |
| 361 |
| 362 (function testNameNotReflectedInToString() { |
| 363 var f = function() {}; |
| 364 var g = function*() {}; |
| 365 var obj = { |
| 366 ['h']: function() {}, |
| 367 i: () => {} |
| 368 }; |
| 369 assertEquals('function () {}', f.toString()); |
| 370 assertEquals('function* () {}', g.toString()); |
| 371 assertEquals('function () {}', obj.h.toString()); |
| 372 assertEquals('() => {}', obj.i.toString()); |
| 373 })(); |
| OLD | NEW |