Remove selection of incorrect async iteration tests

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
Rick Waldron 2017-07-21 18:31:04 -04:00
parent 4ea2931f16
commit f83d422eae
10 changed files with 0 additions and 519 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);