mirror of https://github.com/tc39/test262.git
Regenerate tests
This commit is contained in:
parent
f810ad2550
commit
76ff88ff2f
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue