Regenerate tests

This commit is contained in:
André Bargull 2017-09-02 17:08:46 +02:00 committed by Rick Waldron
parent f810ad2550
commit 76ff88ff2f
14 changed files with 46 additions and 13 deletions

View File

@ -42,6 +42,6 @@ iter.next().then(() => {
assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
}).then($DONE, $DONE);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);
assert.sameValue(callCount, 1);

View File

@ -42,6 +42,6 @@ iter.next().then(() => {
assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
}).then($DONE, $DONE);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);
assert.sameValue(callCount, 1);

View File

@ -49,6 +49,6 @@ iter.next().then(() => {
assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
}).then($DONE, $DONE);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);
assert.sameValue(callCount, 1);

View File

@ -49,6 +49,6 @@ iter.next().then(() => {
assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
}).then($DONE, $DONE);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);
assert.sameValue(callCount, 1);

View File

@ -42,6 +42,6 @@ iter.next().then(() => {
assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
}).then($DONE, $DONE);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);
assert.sameValue(callCount, 1);

View File

@ -42,6 +42,6 @@ iter.next().then(() => {
assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
}).then($DONE, $DONE);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);
assert.sameValue(callCount, 1);

View File

@ -49,6 +49,6 @@ iter.next().then(() => {
assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
}).then($DONE, $DONE);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);
assert.sameValue(callCount, 1);

View File

@ -49,6 +49,6 @@ iter.next().then(() => {
assert.sameValue(done, true, "The value of IteratorResult.done is `true`");
assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`");
}).then($DONE, $DONE);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);
assert.sameValue(callCount, 1);

View File

@ -35,3 +35,8 @@ async function fn() {
}
let promise = fn();
promise.then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => {
assert.sameValue(iterCount, 0);
assert.sameValue(constructor, TypeError);
}).then($DONE, $DONE);

View File

@ -76,3 +76,9 @@ async function fn() {
}
let promise = fn();
promise.then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => {
assert.sameValue(iterCount, 0);
assert.sameValue(nextCount, 2);
assert.sameValue(constructor, TypeError);
}).then($DONE, $DONE);

View File

@ -24,6 +24,12 @@ info: |
lhs using AssignmentPattern as the goal symbol.
[...]
AssignmentElement : DestructuringAssignmentTarget Initializer
1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
a. Let lref be the result of evaluating DestructuringAssignmentTarget.
b. ReturnIfAbrupt(lref).
[...]
ArrayAssignmentPattern : [ AssignmentElementList ]
[...]
@ -61,7 +67,12 @@ async function * fn() {
let iter = fn();
iter.next().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => {
assert.sameValue(unreachable, 0);
assert.sameValue(constructor, TypeError);
}).then($DONE, $DONE);
iter.next().then(result => {
assert.sameValue(result.value, undefined);
assert.sameValue(result.done, false);
iter.return().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => {
assert.sameValue(unreachable, 0);
assert.sameValue(constructor, TypeError);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);

View File

@ -35,3 +35,8 @@ async function * fn() {
}
let promise = fn().next();
promise.then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => {
assert.sameValue(iterCount, 0);
assert.sameValue(constructor, TypeError);
}).then($DONE, $DONE);

View File

@ -76,3 +76,9 @@ async function * fn() {
}
let promise = fn().next();
promise.then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => {
assert.sameValue(iterCount, 0);
assert.sameValue(nextCount, 2);
assert.sameValue(constructor, TypeError);
}).then($DONE, $DONE);

View File

@ -71,4 +71,4 @@ iter.next().then(() => {
assert.sameValue(x, 1, 'x');
assert.sameValue(y.length, 0, 'y.length');
}).then($DONE, $DONE);
}).then($DONE, $DONE);
}, $DONE).catch($DONE);