Fix async generator test templates

- Insert a missing .next() call
- Avoid overlapping names used in test cases

Case files like `src/dstr-binding/ary-ptrn-elem-ary-elision-init.case` are already setting
bindings named `g`. Renaming them in the templates prevents overlapping names.
This commit is contained in:
Daniel Ehrenberg 2017-04-06 23:51:46 +02:00 committed by Leo Balter
parent 73c2d51734
commit dcfcd17ae7
No known key found for this signature in database
GPG Key ID: 2C75F319D398E36B
4 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ flags: [async]
var callCount = 0;
var f;
f = async function* g(/*{ elems }*/ = /*{ vals }*/) {
f = async function* h(/*{ elems }*/ = /*{ vals }*/) {
/*{ body }*/
callCount = callCount + 1;
};

View File

@ -19,7 +19,7 @@ flags: [async]
var callCount = 0;
var f;
f = async function* g(/*{ elems }*/) {
f = async function* h(/*{ elems }*/) {
/*{ body }*/
callCount = callCount + 1;
};

View File

@ -48,6 +48,6 @@ class C {
}
};
new C().method(/*{ vals }*/).then(() => {
new C().method(/*{ vals }*/).next().then(() => {
assert.sameValue(callCount, 1, 'invoked exactly once');
}).then($DONE, $DONE);

View File

@ -17,7 +17,7 @@ info: |
---*/
var f;
f = async function* g(/*{ elems }*/ = /*{ vals }*/) {
f = async function* h(/*{ elems }*/ = /*{ vals }*/) {
/*{ body }*/
};