test262/src/arguments/default/gen-func-expr.template
Leo Balter b3092c61b6 Add generators flags for tests depending on generators features (#1259)
* Add missing generators feature flags

* Generate files

* Add generators flags

* fixup! Add generators flags
2017-10-04 16:12:34 -04:00

28 lines
815 B
Plaintext

// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/arguments-object/gen-func-expr-
name: generator function expression
esid: sec-arguments-exotic-objects
info: |
9.4.4 Arguments Exotic Objects
Most ECMAScript functions make an arguments object available to their code. Depending upon the
characteristics of the function definition, its arguments object is either an ordinary object
or an arguments exotic object.
features: [generators]
---*/
var callCount = 0;
// Stores a reference `ref` for case evaluation
var ref;
ref = function*() {
/*{ body }*/
callCount = callCount + 1;
};
ref(/*{ args }*/).next();
assert.sameValue(callCount, 1, 'generator function invoked exactly once');