From 76ff88ff2f9ea9144c96fa8c9298b9adff8202ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Sat, 2 Sep 2017 17:08:46 +0200 Subject: [PATCH] Regenerate tests --- ...e-reject-next-yield-star-async-iterator.js | 2 +- ...e-reject-next-yield-star-async-iterator.js | 2 +- ...e-reject-next-yield-star-async-iterator.js | 2 +- ...e-reject-next-yield-star-async-iterator.js | 2 +- ...e-reject-next-yield-star-async-iterator.js | 2 +- ...e-reject-next-yield-star-async-iterator.js | 2 +- ...e-reject-next-yield-star-async-iterator.js | 2 +- ...e-reject-next-yield-star-async-iterator.js | 2 +- ...ync-func-decl-dstr-array-elem-put-const.js | 5 +++++ ...-trlg-iter-elision-iter-nrml-close-null.js | 6 ++++++ ...cl-dstr-array-elem-iter-rtrn-close-null.js | 19 +++++++++++++++---- ...sync-gen-decl-dstr-array-elem-put-const.js | 5 +++++ ...-trlg-iter-elision-iter-nrml-close-null.js | 6 ++++++ ...ray-elem-trlg-iter-rest-nrml-close-skip.js | 2 +- 14 files changed, 46 insertions(+), 13 deletions(-) diff --git a/test/language/expressions/async-generator/named-yield-promise-reject-next-yield-star-async-iterator.js b/test/language/expressions/async-generator/named-yield-promise-reject-next-yield-star-async-iterator.js index 0794cd9f6c..ef51bfd567 100644 --- a/test/language/expressions/async-generator/named-yield-promise-reject-next-yield-star-async-iterator.js +++ b/test/language/expressions/async-generator/named-yield-promise-reject-next-yield-star-async-iterator.js @@ -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); diff --git a/test/language/expressions/async-generator/yield-promise-reject-next-yield-star-async-iterator.js b/test/language/expressions/async-generator/yield-promise-reject-next-yield-star-async-iterator.js index ae21e98dff..6c529739f5 100644 --- a/test/language/expressions/async-generator/yield-promise-reject-next-yield-star-async-iterator.js +++ b/test/language/expressions/async-generator/yield-promise-reject-next-yield-star-async-iterator.js @@ -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); diff --git a/test/language/expressions/class/async-gen-method-static-yield-promise-reject-next-yield-star-async-iterator.js b/test/language/expressions/class/async-gen-method-static-yield-promise-reject-next-yield-star-async-iterator.js index 9f17fe1245..8a3c74ce4a 100644 --- a/test/language/expressions/class/async-gen-method-static-yield-promise-reject-next-yield-star-async-iterator.js +++ b/test/language/expressions/class/async-gen-method-static-yield-promise-reject-next-yield-star-async-iterator.js @@ -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); diff --git a/test/language/expressions/class/async-gen-method-yield-promise-reject-next-yield-star-async-iterator.js b/test/language/expressions/class/async-gen-method-yield-promise-reject-next-yield-star-async-iterator.js index c245cf3579..248ebd8736 100644 --- a/test/language/expressions/class/async-gen-method-yield-promise-reject-next-yield-star-async-iterator.js +++ b/test/language/expressions/class/async-gen-method-yield-promise-reject-next-yield-star-async-iterator.js @@ -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); diff --git a/test/language/expressions/object/method-definition/async-gen-yield-promise-reject-next-yield-star-async-iterator.js b/test/language/expressions/object/method-definition/async-gen-yield-promise-reject-next-yield-star-async-iterator.js index 26167b5f7f..dd1e45c59c 100644 --- a/test/language/expressions/object/method-definition/async-gen-yield-promise-reject-next-yield-star-async-iterator.js +++ b/test/language/expressions/object/method-definition/async-gen-yield-promise-reject-next-yield-star-async-iterator.js @@ -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); diff --git a/test/language/statements/async-generator/yield-promise-reject-next-yield-star-async-iterator.js b/test/language/statements/async-generator/yield-promise-reject-next-yield-star-async-iterator.js index 5c455994af..e50ead9336 100644 --- a/test/language/statements/async-generator/yield-promise-reject-next-yield-star-async-iterator.js +++ b/test/language/statements/async-generator/yield-promise-reject-next-yield-star-async-iterator.js @@ -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); diff --git a/test/language/statements/class/async-gen-method-static-yield-promise-reject-next-yield-star-async-iterator.js b/test/language/statements/class/async-gen-method-static-yield-promise-reject-next-yield-star-async-iterator.js index ba0401d209..dd221b392b 100644 --- a/test/language/statements/class/async-gen-method-static-yield-promise-reject-next-yield-star-async-iterator.js +++ b/test/language/statements/class/async-gen-method-static-yield-promise-reject-next-yield-star-async-iterator.js @@ -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); diff --git a/test/language/statements/class/async-gen-method-yield-promise-reject-next-yield-star-async-iterator.js b/test/language/statements/class/async-gen-method-yield-promise-reject-next-yield-star-async-iterator.js index b4d12f15e8..ba26520a65 100644 --- a/test/language/statements/class/async-gen-method-yield-promise-reject-next-yield-star-async-iterator.js +++ b/test/language/statements/class/async-gen-method-yield-promise-reject-next-yield-star-async-iterator.js @@ -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); diff --git a/test/language/statements/for-await-of/async-func-decl-dstr-array-elem-put-const.js b/test/language/statements/for-await-of/async-func-decl-dstr-array-elem-put-const.js index f0704628a6..37300b46e2 100644 --- a/test/language/statements/for-await-of/async-func-decl-dstr-array-elem-put-const.js +++ b/test/language/statements/for-await-of/async-func-decl-dstr-array-elem-put-const.js @@ -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); diff --git a/test/language/statements/for-await-of/async-func-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js b/test/language/statements/for-await-of/async-func-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js index 8bab2affad..550c6664d1 100644 --- a/test/language/statements/for-await-of/async-func-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js +++ b/test/language/statements/for-await-of/async-func-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js @@ -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); diff --git a/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null.js b/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null.js index 78a15c3efb..ddd3f1fb00 100644 --- a/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null.js +++ b/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null.js @@ -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); diff --git a/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-put-const.js b/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-put-const.js index 614f51176f..6d74527e0b 100644 --- a/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-put-const.js +++ b/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-put-const.js @@ -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); diff --git a/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js b/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js index 55ffa40678..470b31e8aa 100644 --- a/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js +++ b/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-elision-iter-nrml-close-null.js @@ -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); diff --git a/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-rest-nrml-close-skip.js b/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-rest-nrml-close-skip.js index 6e3d79b90d..8a10aa292e 100644 --- a/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-rest-nrml-close-skip.js +++ b/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-trlg-iter-rest-nrml-close-skip.js @@ -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);