From f83d422eaecbf0ad752ab5b6ff9578cdbc85d0eb Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 21 Jul 2017 18:31:04 -0400 Subject: [PATCH] Remove selection of incorrect async iteration tests Signed-off-by: Rick Waldron --- .../array-elem-init-let.case | 24 ------- .../array-elem-put-let.case | 22 ------ ...rray-elem-trlg-iter-elision-iter-abpt.case | 63 ----------------- .../array-elem-trlg-iter-get-err.case | 33 --------- ...y-elem-trlg-iter-list-nrml-close-null.case | 65 ----------------- ...ay-elem-trlg-iter-list-rtrn-close-err.case | 60 ---------------- ...y-elem-trlg-iter-list-rtrn-close-null.case | 55 --------------- .../array-elem-trlg-iter-list-rtrn-close.case | 68 ------------------ ...ay-elem-trlg-iter-rest-rtrn-close-err.case | 69 ------------------- ...y-elem-trlg-iter-rest-rtrn-close-null.case | 60 ---------------- 10 files changed, 519 deletions(-) delete mode 100644 src/dstr-assignment-for-await/array-elem-init-let.case delete mode 100644 src/dstr-assignment-for-await/array-elem-put-let.case delete mode 100644 src/dstr-assignment-for-await/array-elem-trlg-iter-elision-iter-abpt.case delete mode 100644 src/dstr-assignment-for-await/array-elem-trlg-iter-get-err.case delete mode 100644 src/dstr-assignment-for-await/array-elem-trlg-iter-list-nrml-close-null.case delete mode 100644 src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close-err.case delete mode 100644 src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close-null.case delete mode 100644 src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close.case delete mode 100644 src/dstr-assignment-for-await/array-elem-trlg-iter-rest-rtrn-close-err.case delete mode 100644 src/dstr-assignment-for-await/array-elem-trlg-iter-rest-rtrn-close-null.case diff --git a/src/dstr-assignment-for-await/array-elem-init-let.case b/src/dstr-assignment-for-await/array-elem-init-let.case deleted file mode 100644 index b25e02e031..0000000000 --- a/src/dstr-assignment-for-await/array-elem-init-let.case +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -desc: > - Value retrieval of Initializer obeys `let` semantics. -template: default -es6id: 12.14.5.3 -features: [let] ----*/ - -//- setup -let x; -//- elems -[ x = y ] -//- vals -[] -//- teardown -promise.then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(constructor, ReferenceError); -}).then($DONE, $DONE); - -let y; - diff --git a/src/dstr-assignment-for-await/array-elem-put-let.case b/src/dstr-assignment-for-await/array-elem-put-let.case deleted file mode 100644 index 69a58f4281..0000000000 --- a/src/dstr-assignment-for-await/array-elem-put-let.case +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -desc: > - The assignment target should obey `let` semantics. -template: default -es6id: 12.14.5.3 -features: [let] ----*/ - -//- elems -[ x ] -//- vals -[] -//- teardown -promise.then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(iterCount, 0); - assert.sameValue(constructor, ReferenceError); -}).then($DONE, $DONE); - -let x; diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-elision-iter-abpt.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-elision-iter-abpt.case deleted file mode 100644 index 29f053d1a5..0000000000 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-elision-iter-abpt.case +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Abrupt completion returned during evaluation of elision -info: | - ArrayAssignmentPattern : - [ AssignmentElementList , Elisionopt AssignmentRestElementopt ] - - [...] - 6. If Elision is present, then - a. Let status be the result of performing - IteratorDestructuringAssignmentEvaluation of Elision with - iteratorRecord as the argument. - b. If status is an abrupt completion, then - i. If iteratorRecord.[[done]] is false, return - IteratorClose(iterator, status). - ii. Return Completion(status). -features: [Symbol.iterator] -template: async-generator -es6id: 12.14.5.2 -esid: sec-runtime-semantics-destructuringassignmentevaluation ----*/ - -//- setup -let nextCount = 0; -let returnCount = 0; -let x; -let iterator = { - next() { - nextCount += 1; - - if (nextCount === 2) { - throw new Test262Error(); - } - - // Set an upper-bound to limit unnecessary iteration in non-conformant - // implementations - return { done: nextCount > 10 }; - }, - return() { - returnCount += 1; - } -}; -let iterable = { - [Symbol.iterator]() { - return iterator; - } -}; - -//- elems -[ x , , ] -//- vals -iterable -//- teardown - -iter.next().then(() => { - iter.next().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(nextCount, 2); - assert.sameValue(returnCount, 0); - assert.sameValue(constructor, Test262Error); - - }).then($DONE, $DONE); -}, $DONE); diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-get-err.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-get-err.case deleted file mode 100644 index 5fcb2eacb5..0000000000 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-get-err.case +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Abrupt completion returned from GetIterator -info: | - ArrayAssignmentPattern : - [ AssignmentElementList , Elisionopt AssignmentRestElementopt ] - - 1. Let iterator be GetIterator(value). - 2. ReturnIfAbrupt(iterator). -features: [Symbol.iterator] -template: async-generator -es6id: 12.14.5.2 -esid: sec-runtime-semantics-destructuringassignmentevaluation ----*/ - -//- setup -let iterable = { - [Symbol.iterator]() { - throw new Test262Error(); - } -}; -let x; -//- elems -[ x , ] -//- vals -iterable - -//- teardown -iter.return().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(iterCount, 0); - assert.sameValue(constructor, Test262Error); -}).then($DONE, $DONE); diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-list-nrml-close-null.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-list-nrml-close-null.case deleted file mode 100644 index 8669d0013c..0000000000 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-list-nrml-close-null.case +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: > - IteratorClose throws a TypeError when `return` returns a non-Object value -info: | - ArrayAssignmentPattern : - [ AssignmentElementList , Elisionopt AssignmentRestElementopt ] - - [...] - 2. Let iteratorRecord be Record {[[Iterator]]: iterator, [[Done]]: false}. - 3. Let status be the result of performing - IteratorDestructuringAssignmentEvaluation of AssignmentElementList using - iteratorRecord as the argument. - 4. If status is an abrupt completion, then - a. If iteratorRecord.[[Done]] is false, return ? IteratorClose(iterator, status). - b. Return Completion(status). - - 7.4.6 IteratorClose( iterator, completion ) - - [...] - 5. Let innerResult be Call(return, iterator, « »). - 6. If completion.[[type]] is throw, return Completion(completion). - 7. If innerResult.[[type]] is throw, return Completion(innerResult). - 8. If Type(innerResult.[[value]]) is not Object, throw a TypeError - exception. - -features: [Symbol.iterator] -template: async-generator -es6id: 12.14.5.2 -esid: sec-runtime-semantics-destructuringassignmentevaluation ----*/ - -//- setup -let x; -let nextCount = 0; -let iterator = { - next() { - nextCount += 1; - // Set an upper-bound to limit unnecessary iteration in non-conformant - // implementations - return { done: nextCount > 10 }; - }, - return() { - return null; - } -}; -let iterable = { - [Symbol.iterator]() { - return iterator; - } -}; - -//- error -TypeError -//- elems -[ x , ] -//- vals -iterable -//- teardown -iter.return().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(iterCount, 0); - assert.sameValue(constructor, TypeError); -}).then($DONE, $DONE); - diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close-err.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close-err.case deleted file mode 100644 index 2842001302..0000000000 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close-err.case +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: > - IteratorClose is invoked when evaluation of AssignmentElementList returns - a "return" completion and the iterator has not been marked as "done" -info: | - ArrayAssignmentPattern : - [ AssignmentElementList , Elisionopt AssignmentRestElementopt ] - - [...] - 2. Let iteratorRecord be Record {[[Iterator]]: iterator, [[Done]]: false}. - 3. Let status be the result of performing - IteratorDestructuringAssignmentEvaluation of AssignmentElementList using - iteratorRecord as the argument. - 4. If status is an abrupt completion, then - a. If iteratorRecord.[[Done]] is false, return ? IteratorClose(iterator, status). - b. Return Completion(status). - - 7.4.6 IteratorClose( iterator, completion ) - - [...] - 5. Let innerResult be Call(return, iterator, « »). - 6. If completion.[[type]] is throw, return Completion(completion). - 7. If innerResult.[[type]] is throw, return Completion(innerResult). - -features: [Symbol.iterator, generators] -template: async-generator -es6id: 12.14.5.2 -esid: sec-runtime-semantics-destructuringassignmentevaluation ----*/ - -//- setup -let returnCount = 0; -let unreachable = 0; -let iterator = { - return() { - returnCount += 1; - - throw new Test262Error(); - } -}; -let iterable = { - [Symbol.iterator]() { - return iterator; - } -}; - -//- elems -[ {}[yield] , ] -//- vals -iterable -//- body -unreachable += 1; -//- teardown -iter.return().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(returnCount, 1); - assert.sameValue(unreachable, 0, 'Unreachable statement was not executed'); - assert.sameValue(constructor, Test262Error); -}).then($DONE, $DONE); diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close-null.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close-null.case deleted file mode 100644 index 7b8971233e..0000000000 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close-null.case +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: > - IteratorClose throws a TypeError when `return` returns a non-Object value -info: | - ArrayAssignmentPattern : - [ AssignmentElementList , Elisionopt AssignmentRestElementopt ] - - [...] - 2. Let iteratorRecord be Record {[[Iterator]]: iterator, [[Done]]: false}. - 3. Let status be the result of performing - IteratorDestructuringAssignmentEvaluation of AssignmentElementList using - iteratorRecord as the argument. - 4. If status is an abrupt completion, then - a. If iteratorRecord.[[Done]] is false, return ? IteratorClose(iterator, status). - b. Return Completion(status). - - 7.4.6 IteratorClose( iterator, completion ) - - [...] - 5. Let innerResult be Call(return, iterator, « »). - 6. If completion.[[type]] is throw, return Completion(completion). - 7. If innerResult.[[type]] is throw, return Completion(innerResult). - 8. If Type(innerResult.[[value]]) is not Object, throw a TypeError - exception. - -features: [Symbol.iterator, generators] -template: async-generator -es6id: 12.14.5.2 -esid: sec-runtime-semantics-destructuringassignmentevaluation ----*/ - -//- setup -let iterator = { - return() { - return null; - } -}; -let iterable = { - [Symbol.iterator]() { - return iterator; - } -}; - - -//- elems - [ {}[yield] , ] -//- vals -iterable -//- teardown -iter.return().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(iterCount, 0); - assert.sameValue(constructor, TypeError); -}).then($DONE, $DONE); diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close.case deleted file mode 100644 index bb04127070..0000000000 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-list-rtrn-close.case +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: > - IteratorClose is invoked when evaluation of AssignmentElementList returns - a "return" completion and the iterator has not been marked as "done" -info: | - ArrayAssignmentPattern : - [ AssignmentElementList , Elisionopt AssignmentRestElementopt ] - - [...] - 2. Let iteratorRecord be Record {[[Iterator]]: iterator, [[Done]]: false}. - 3. Let status be the result of performing - IteratorDestructuringAssignmentEvaluation of AssignmentElementList using - iteratorRecord as the argument. - 4. If status is an abrupt completion, then - a. If iteratorRecord.[[Done]] is false, return ? IteratorClose(iterator, status). - b. Return Completion(status). - - 7.4.6 IteratorClose( iterator, completion ) - - [...] - 5. Let innerResult be Call(return, iterator, « »). - 6. If completion.[[type]] is throw, return Completion(completion). - 7. If innerResult.[[type]] is throw, return Completion(innerResult). - -features: [Symbol.iterator, generators] -template: async-generator -es6id: 12.14.5.2 -esid: sec-runtime-semantics-destructuringassignmentevaluation ----*/ - -//- setup -let returnCount = 0; -let unreachable = 0; -let thisValue = null; -let args = null; -let iterator = { - return() { - returnCount += 1; - thisValue = this; - args = arguments; - return {}; - } -}; -let iterable = { - [Symbol.iterator]() { - return iterator; - } -}; - - -//- elems -[ {}[yield] , ] -//- vals -iterable -//- body - unreachable += 1; -//- teardown -iter.return(888).then(result => { - assert.sameValue(returnCount, 1); - assert.sameValue(unreachable, 0, 'Unreachable statement was not executed'); - assert.sameValue(result.value, 888); - assert(result.done, 'Iterator correctly closed'); - assert.sameValue(thisValue, iterator, 'correct `this` value'); - assert(!!args, 'arguments object provided'); - assert.sameValue(args.length, 0, 'zero arguments specified'); -}).then($DONE, $DONE); diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-rtrn-close-err.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-rtrn-close-err.case deleted file mode 100644 index c283de7cbf..0000000000 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-rtrn-close-err.case +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: > - IteratorClose is called when AssignmentRestEvaluation produces a "return" - completion due to reference evaluation -info: | - ArrayAssignmentPattern : - [ AssignmentElementList , Elisionopt AssignmentRestElementopt ] - - [...] - 6. If AssignmentRestElement is present, then - a. Let status be the result of performing - IteratorDestructuringAssignmentEvaluation of AssignmentRestElement - with iteratorRecord as the argument. - 7. If iteratorRecord.[[Done]] is false, return ? IteratorClose(iterator, status). - 8. Return Completion(status). - - 7.4.6 IteratorClose ( iterator, completion ) - - [...] - 5. Let innerResult be Call(return, iterator, « »). - 6. If completion.[[type]] is throw, return Completion(completion). - 7. If innerResult.[[type]] is throw, return Completion(innerResult). - -features: [Symbol.iterator, generators] -template: async-generator -es6id: 12.14.5.2 -esid: sec-runtime-semantics-destructuringassignmentevaluation ----*/ - -//- setup -let nextCount = 0; -let returnCount = 0; -let unreachable = 0; -let x; -let iterator = { - next() { - nextCount += 1; - // Set an upper-bound to limit unnecessary iteration in non-conformant - // implementations - return { done: nextCount > 10 }; - }, - return() { - returnCount += 1; - - throw new Test262Error(); - } -}; -let iterable = { - [Symbol.iterator]() { - return iterator; - } -}; - -//- elems -[ x , ...{}[yield] ] -//- vals -iterable -//- body - unreachable += 1; -//- teardown -iter.next().then(() => { - iter.return().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(nextCount, 1); - assert.sameValue(returnCount, 1); - assert.sameValue(constructor, Test262Error); - }).then($DONE, $DONE); -}).then($DONE, $DONE); diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-rtrn-close-null.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-rtrn-close-null.case deleted file mode 100644 index 69681bac10..0000000000 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-rtrn-close-null.case +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: > - IteratorClose throws a TypeError when `return` returns a non-Object value -info: | - ArrayAssignmentPattern : - [ AssignmentElementList , Elisionopt AssignmentRestElementopt ] - - [...] - 6. If AssignmentRestElement is present, then - a. Let status be the result of performing - IteratorDestructuringAssignmentEvaluation of AssignmentRestElement - with iteratorRecord as the argument. - 7. If iteratorRecord.[[Done]] is false, return ? IteratorClose(iterator, status). - 8. Return Completion(status). - - 7.4.6 IteratorClose ( iterator, completion ) - - [...] - 5. Let innerResult be Call(return, iterator, « »). - 6. If completion.[[type]] is throw, return Completion(completion). - 7. If innerResult.[[type]] is throw, return Completion(innerResult). - -features: [Symbol.iterator, generators] -template: async-generator -es6id: 12.14.5.2 -esid: sec-runtime-semantics-destructuringassignmentevaluation ----*/ - -//- setup -let nextCount = 0; -let x; -let iterator = { - next() { - nextCount += 1; - // Set an upper-bound to limit unnecessary iteration in non-conformant - // implementations - return { done: nextCount > 10 }; - }, - return() { - return null; - } -}; -let iterable = { - [Symbol.iterator]() { - return iterator; - } -}; - -//- elems -[ x , ...{}[yield] ] -//- vals -iterable -//- teardown -iter.return().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(nextCount, 1); - assert.sameValue(constructor, Test262Error); -}).then($DONE, $DONE); -