blob: 095ddd692ae0f67d5841705c5183719340d2d187 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// |reftest| skip-if(!this.hasOwnProperty('Iterator')) -- Iterator is not enabled unconditionally
class Iter {
next(value) {
this.v = value;
return { done: false, value };
}
}
const iter = new Iter();
const wrap = Iterator.from(iter);
assertEq(iter !== wrap, true);
assertEq(iter.v, undefined);
wrap.next(1);
assertEq(iter.v, 1);
if (typeof reportCompare === 'function')
reportCompare(0, 0);
|