Add missing Symbol.iterator feature flags

This commit is contained in:
Leo Balter 2017-09-07 18:17:05 -04:00 committed by Rick Waldron
parent 9f526c0bcd
commit 2bee5df77a
45 changed files with 89 additions and 55 deletions

View File

@ -5,6 +5,7 @@
description: Source object has iterator which throws
esid: sec-array.from
es6id: 22.1.2.1
features: [Symbol.iterator]
---*/
var array = [ 2, 4, 8, 16, 32, 64, 128 ];

View File

@ -5,6 +5,7 @@
description: Source object has iterator
esid: sec-array.from
es6id: 22.1.2.1
features: [Symbol.iterator]
---*/
var array = [ 2, 4, 8, 16, 32, 64, 128 ];

View File

@ -6,6 +6,7 @@
description: >
The @@toStringTag attribute should be defined directly on the prototype.
es6id: 22.1.5.2.2
features: [Symbol.iterator]
---*/
var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]());

View File

@ -7,6 +7,7 @@
`Object.prototype.toString` should honor the value of the @@toStringTag
attribute.
es6id: 22.1.5.2.2
features: [Symbol.iterator]
---*/
var iter = [][Symbol.iterator]();

View File

@ -6,7 +6,7 @@ esid: sec-%arrayiteratorprototype%.next
description: >
Visits each element of the array in order and ceases iteration once all
values have been visited.
features: [TypedArray]
features: [Symbol.iterator, TypedArray]
---*/
var array = new Float32Array([3, 1, 2]);
var iterator = array[Symbol.iterator]();

View File

@ -6,7 +6,7 @@ esid: sec-%arrayiteratorprototype%.next
description: >
Visits each element of the array in order and ceases iteration once all
values have been visited.
features: [TypedArray]
features: [Symbol.iterator, TypedArray]
---*/
var array = new Float64Array([3, 1, 2]);
var iterator = array[Symbol.iterator]();

View File

@ -6,7 +6,7 @@ esid: sec-%arrayiteratorprototype%.next
description: >
Visits each element of the array in order and ceases iteration once all
values have been visited.
features: [TypedArray]
features: [Symbol.iterator, TypedArray]
---*/
var array = new Int16Array([3, 1, 2]);
var iterator = array[Symbol.iterator]();

View File

@ -6,7 +6,7 @@ esid: sec-%arrayiteratorprototype%.next
description: >
Visits each element of the array in order and ceases iteration once all
values have been visited.
features: [TypedArray]
features: [Symbol.iterator, TypedArray]
---*/
var array = new Int32Array([3, 1, 2]);
var iterator = array[Symbol.iterator]();

View File

@ -6,7 +6,7 @@ esid: sec-%arrayiteratorprototype%.next
description: >
Visits each element of the array in order and ceases iteration once all
values have been visited.
features: [TypedArray]
features: [Symbol.iterator, TypedArray]
---*/
var array = new Int8Array([3, 1, 2]);
var iterator = array[Symbol.iterator]();

View File

@ -6,7 +6,7 @@ esid: sec-%arrayiteratorprototype%.next
description: >
Visits each element of the array in order and ceases iteration once all
values have been visited.
features: [TypedArray]
features: [Symbol.iterator, TypedArray]
---*/
var array = new Uint16Array([3, 1, 2]);
var iterator = array[Symbol.iterator]();

View File

@ -6,7 +6,7 @@ esid: sec-%arrayiteratorprototype%.next
description: >
Visits each element of the array in order and ceases iteration once all
values have been visited.
features: [TypedArray]
features: [Symbol.iterator, TypedArray]
---*/
var array = new Uint32Array([3, 1, 2]);
var iterator = array[Symbol.iterator]();

View File

@ -6,7 +6,7 @@ esid: sec-%arrayiteratorprototype%.next
description: >
Visits each element of the array in order and ceases iteration once all
values have been visited.
features: [TypedArray]
features: [Symbol.iterator, TypedArray]
---*/
var array = new Uint8Array([3, 1, 2]);
var iterator = array[Symbol.iterator]();

View File

@ -6,7 +6,7 @@ esid: sec-%arrayiteratorprototype%.next
description: >
Visits each element of the array in order and ceases iteration once all
values have been visited.
features: [TypedArray]
features: [Symbol.iterator, TypedArray]
---*/
var array = new Uint8ClampedArray([3, 1, 2]);
var iterator = array[Symbol.iterator]();

View File

@ -7,6 +7,7 @@ description: >
Once exhausted, iterators for mapped arguments exotic objects should not
emit new values added to the object.
flags: [noStrict]
features: [Symbol.iterator]
---*/
(function(a, b, c) {

View File

@ -7,6 +7,7 @@ description: >
Prior to being exhausted, iterators for mapped arguments exotic objects
should honor the insertion of additional argument values.
flags: [noStrict]
features: [Symbol.iterator]
---*/
(function(a, b, c) {

View File

@ -7,6 +7,7 @@ description: >
Mapped arguments exotic objects should implement the Array iterator
protocol.
flags: [noStrict]
features: [Symbol.iterator]
---*/
(function(a, b, c) {

View File

@ -7,6 +7,7 @@ description: >
Prior to being exhausted, iterators for mapped arguments exotic objects
should honor argument removal.
flags: [noStrict]
features: [Symbol.iterator]
---*/
(function(a, b, c) {

View File

@ -7,6 +7,7 @@ description: >
Once exhausted, iterators for unmapped arguments exotic objects should not
emit new values added to the object.
flags: [noStrict]
features: [Symbol.iterator]
---*/
(function(a, b, c) {

View File

@ -7,6 +7,7 @@ description: >
Prior to being exhausted, iterators for unmapped arguments exotic objects
should honor the insertion of additional argument values.
flags: [noStrict]
features: [Symbol.iterator]
---*/
(function(a, b, c) {

View File

@ -7,6 +7,7 @@ description: >
Unmapped arguments exotic objects should implement the Array iterator
protocol.
flags: [noStrict]
features: [Symbol.iterator]
---*/
(function(a, b, c) {

View File

@ -7,6 +7,7 @@ description: >
Prior to being exhausted, iterators for unmapped arguments exotic objects
should honor argument removal.
flags: [noStrict]
features: [Symbol.iterator]
---*/
(function(a, b, c) {

View File

@ -10,6 +10,7 @@
after the iterator is "done", the new item should not be accessible via
iteration.
es6id: 22.1.3.30
features: [Symbol.iterator]
---*/
var array = [];

View File

@ -7,6 +7,7 @@
The method should return a valid iterator with the context as the
IteratedObject.
es6id: 22.1.3.30
features: [Symbol.iterator]
---*/
var array = ['a', 'b', 'c'];

View File

@ -21,6 +21,7 @@ info: >
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
features: [Symbol.iterator]
---*/
var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]());

View File

@ -18,6 +18,7 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
features: [Symbol.iterator]
---*/
var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]());

View File

@ -7,6 +7,7 @@
Iterator Instance (22.1.5.3), throw a TypeError exception.
es6id: 22.1.5.2.1
esid: sec-%arrayiteratorprototype%.next
features: [Symbol.iterator]
---*/
var array = [0];

View File

@ -8,6 +8,7 @@
writable and configurable, but not enumerable.
includes: [propertyHelper.js]
es6id: 17
features: [Symbol.iterator]
---*/
var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]());

View File

@ -17,6 +17,7 @@ description: >
f. Let status be Call(adder, set, «nextValue.[[value]]»).
g. If status is an abrupt completion, return IteratorClose(iter, status).
features: [Symbol.iterator]
---*/
var count = 0;

View File

@ -11,6 +11,7 @@ description: >
9. Repeat
a. Let next be IteratorStep(iter).
b. ReturnIfAbrupt(next).
features: [Symbol.iterator]
---*/
var iterable = {};

View File

@ -12,6 +12,7 @@ description: >
...
d. Let nextValue be IteratorValue(next).
e. ReturnIfAbrupt(nextValue).
features: [Symbol.iterator]
---*/
var count = 0;

View File

@ -5,6 +5,7 @@ es6id: 21.1.5.2
description: >
The [[Prototype]] internal slot ofthe %StringIteratorPrototype% is the
%IteratorPrototype% intrinsic object (25.1.2).
features: [Symbol.iterator]
---*/
var strItrProto = Object.getPrototypeOf(''[Symbol.iterator]());

View File

@ -17,6 +17,7 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
features: [Symbol.iterator]
---*/
var StringIteratorProto = Object.getPrototypeOf(new String()[Symbol.iterator]());

View File

@ -5,6 +5,7 @@ es6id: 21.1.5.2.1
description: >
Iteration should respect UTF-16-encoded Unicode code points specified via
surrogate pairs.
features: [Symbol.iterator]
---*/
var lo = '\uD834';

View File

@ -4,6 +4,7 @@
es6id: 21.1.5.2.1
description: >
Iteration should visit each UTF-8 code point exactly once.
features: [Symbol.iterator]
---*/
var string = "abc";

View File

@ -5,6 +5,7 @@ es6id: 21.1.5.2.1 S 3
description: >
If the `this` value does not have all of the internal slots of an String
Iterator Instance (21.1.5.3), throw a `TypeError` exception.
features: [Symbol.iterator]
---*/
var iterator = ''[Symbol.iterator]();

View File

@ -12,7 +12,7 @@ info: >
3. Assert: GlobalSymbolRegistry does not currently contain an entry for
sym.
4. Return undefined.
features: [Symbol]
features: [Symbol.iterator, Symbol]
---*/
var constructed = Symbol('Symbol.iterator');

View File

@ -12,6 +12,7 @@ info: >
9. Repeat
k. Let status be Call(adder, map, «k.[[value]], v.[[value]]»).
l. If status is an abrupt completion, return IteratorClose(iter, status).
features: [Symbol.iterator]
---*/
var count = 0;

View File

@ -13,6 +13,7 @@ info: >
a. Let next be IteratorStep(iter).
b. ReturnIfAbrupt(next).
...
features: [Symbol.iterator]
---*/
var iterable = {};

View File

@ -14,6 +14,7 @@ info: >
d. Let nextItem be IteratorValue(next).
e. ReturnIfAbrupt(nextItem).
...
features: [Symbol.iterator]
---*/
var iterable = {};

View File

@ -12,6 +12,7 @@ info: >
9. Repeat
f. Let status be Call(adder, set, «nextValue»).
g. If status is an abrupt completion, return IteratorClose(iter, status).
features: [Symbol.iterator]
---*/
var count = 0;

View File

@ -13,6 +13,7 @@ info: >
a. Let next be IteratorStep(iter).
b. ReturnIfAbrupt(next).
...
features: [Symbol.iterator]
---*/
var iterable = {};

View File

@ -13,6 +13,7 @@ info: >
...
d. Let nextValue be IteratorValue(next).
e. ReturnIfAbrupt(nextValue).
features: [Symbol.iterator]
---*/
var count = 0;

View File

@ -5,6 +5,7 @@ es6id: 25.2
description: >
When an iterator is the operand of a `yield *` expression, the generator
should produce an iterator that visits each iterated item.
features: [Symbol.iterator]
---*/
var results = [{ value: 1 }, { value: 8 }, { value: 34, done: true }];

View File

@ -6,7 +6,7 @@ description: >
The [[DefineOwnProperty]] internal method returns `true` if no change is
requested, and `false` otherwise.
flags: [module]
features: [Reflect, Symbol, Symbol.toStringTag]
features: [Symbol.iterator, Reflect, Symbol, Symbol.toStringTag]
---*/
import * as ns from './define-own-property.js';

View File

@ -6,6 +6,7 @@
The method should return a valid iterator that can be traversed using a
`for...of` loop.
es6id: 22.1.3.30
features: [Symbol.iterator]
---*/
var array = [0, 'a', true, false, null, /* hole */, undefined, NaN];