Debian Codegraph @

js/src/tests/test262/built-ins/Function/instance-name.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es6id: 19.2.1.1
6 description: Assignment of function `name` attribute
7 info: |
8 [...]
9 3. Return CreateDynamicFunction(C, NewTarget, "normal", args).
10
11 ES6 19.2.1.1.1
12 RuntimeSemantics: CreateDynamicFunction(constructor, newTarget, kind, args)
13
14 [...]
15 29. Perform SetFunctionName(F, "anonymous").
16 includes: [propertyHelper.js]
17 ---*/
18
19 assert.sameValue(Function().name, 'anonymous');
20 verifyNotEnumerable(Function(), 'name');
21 verifyNotWritable(Function(), 'name');
22 verifyConfigurable(Function(), 'name');
23
24 reportCompare(0, 0);