2016-07-01 20:24:27 +02:00
|
|
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
|
|
esid: sec-properties-of-the-generatorfunction-constructor
|
|
|
|
description: Function "name" property
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2016-07-01 20:24:27 +02:00
|
|
|
The value of the name property of the GeneratorFunction is
|
|
|
|
"GeneratorFunction".
|
|
|
|
|
|
|
|
17 ECMAScript Standard Built-in Objects:
|
|
|
|
Every built-in Function object, including constructors, that is not
|
|
|
|
identified as an anonymous function has a name property whose value is a
|
|
|
|
String.
|
|
|
|
|
|
|
|
Unless otherwise specified, the name property of a built-in Function object,
|
|
|
|
if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]:
|
|
|
|
false, [[Configurable]]: true }.
|
|
|
|
includes: [propertyHelper.js]
|
2017-10-04 22:12:34 +02:00
|
|
|
features: [generators]
|
2016-07-01 20:24:27 +02:00
|
|
|
---*/
|
|
|
|
|
2018-02-15 21:25:56 +01:00
|
|
|
var GeneratorFunction = Object.getPrototypeOf(function*() {}).constructor;
|
2016-07-01 20:24:27 +02:00
|
|
|
|
|
|
|
assert.sameValue(GeneratorFunction.name, 'GeneratorFunction');
|
|
|
|
|
|
|
|
verifyNotEnumerable(GeneratorFunction, 'name');
|
|
|
|
verifyNotWritable(GeneratorFunction, 'name');
|
|
|
|
verifyConfigurable(GeneratorFunction, 'name');
|