Lines Matching refs:iter
14 function assertIteratorIsClosed(iter) { argument
15 assertIteratorResult(undefined, true, iter.next());
17 assertDoesNotThrow(function() { iter.next(); });
18 assertThrows(function() { iter.throw(new Bar); }, Bar);
21 var iter; variable
22 function* nextGenerator() { yield iter.next(); }
23 function* throwGenerator() { yield iter.throw(new Bar); }
26 iter = nextGenerator();
27 assertThrows(function() { iter.throw(new Foo) }, Foo)
28 assertThrows(function() { iter.throw(new Foo) }, Foo)
29 assertIteratorIsClosed(iter);
32 iter = throwGenerator();
33 assertThrows(function() { iter.throw(new Foo) }, Foo)
34 assertThrows(function() { iter.throw(new Foo) }, Foo)
35 assertIteratorIsClosed(iter);
38 iter = nextGenerator();
39 assertThrows(function() { iter.next() }, TypeError)
40 assertIteratorIsClosed(iter);
43 iter = throwGenerator();
44 assertThrows(function() { iter.next() }, TypeError)
45 assertIteratorIsClosed(iter);
49 iter = (function* () { generator
51 iter.next();
57 iter.next();
65 assertIteratorResult(3, false, iter.next());
66 assertIteratorResult(4, false, iter.next());
67 assertIteratorIsClosed(iter);