Lines Matching refs:iter
38 function assertIteratorIsClosed(iter) { argument
39 assertIteratorResult(undefined, true, iter.next());
40 assertDoesNotThrow(function() { iter.next(); });
43 function assertThrownIteratorIsClosed(iter) { argument
44 assertIteratorIsClosed(iter);
49 var iter = g();
50 var result = iter.next();
63 var iter = thunk();
68 assertIteratorResult(v1, v2, iter.next());
70 assertIteratorIsClosed(iter);
73 var iter = thunk();
77 iter.next(send_val));
79 assertIteratorIsClosed(iter);
83 var iter = thunk();
87 iter.next());
90 assertThrows(function () { iter.throw(new Sentinel); }, Sentinel);
91 assertThrownIteratorIsClosed(iter);
264 var iter = new g;
265 iter.x = 1;
266 iter.y = 2;
267 return iter;
363 var iter = g28();
364 assertIteratorResult(1, false, iter.next());
365 assertIteratorResult(2, false, iter.next());
366 assertIteratorResult(3, false, iter.next());
367 assertIteratorResult(undefined, true, iter.next());
374 var iter = g29();
375 assertIteratorResult("a", false, iter.next());
376 assertIteratorResult("b", false, iter.next());
377 assertIteratorResult("c", false, iter.next());
378 assertIteratorResult(undefined, true, iter.next());
419 var iter = { next: next }; variable
421 ret[Symbol.iterator] = function() { return iter; };
428 var iter = iterable[Symbol.iterator]();
432 result = iter.next();
450 function Test1(iter) { argument
451 assertIteratorResult(1, false, iter.next());
452 assertIteratorResult(2, false, iter.next());
453 assertIteratorResult(3, false, iter.next());
454 assertIteratorIsClosed(iter);
458 function Test2(iter) { argument
459 assertThrows(function() { iter.throw(new Sentinel); }, Sentinel);
460 assertThrownIteratorIsClosed(iter);
464 function Test3(iter) { argument
465 assertIteratorResult(1, false, iter.next());
466 assertThrows(function() { iter.throw(new Sentinel); }, Sentinel);
467 assertThrownIteratorIsClosed(iter);
471 function Test4(iter) { argument
472 assertIteratorResult(1, false, iter.next());
473 assertIteratorResult(2, false, iter.next());
475 assertIteratorResult(exn, false, iter.throw(exn));
476 assertIteratorResult(3, false, iter.next());
477 assertIteratorIsClosed(iter);
481 function Test5(iter) { argument
482 assertIteratorResult(1, false, iter.next());
483 assertIteratorResult(2, false, iter.next());
485 assertIteratorResult(exn, false, iter.throw(exn));
486 assertIteratorResult(3, false, iter.next());
487 assertThrows(function() { iter.throw(new Sentinel); }, Sentinel);
488 assertThrownIteratorIsClosed(iter);
492 function Test6(iter) { argument
493 assertIteratorResult(1, false, iter.next());
494 assertIteratorResult(2, false, iter.next());
496 assertIteratorResult(exn, false, iter.throw(exn));
497 assertThrows(function() { iter.throw(new Sentinel); }, Sentinel);
498 assertThrownIteratorIsClosed(iter);
502 function Test7(iter) { argument
503 assertIteratorResult(1, false, iter.next());
504 assertIteratorResult(2, false, iter.next());
505 assertIteratorResult(3, false, iter.next());
506 assertIteratorIsClosed(iter);
518 function Test1(iter) { argument
519 assertIteratorResult(1, false, iter.next());
520 assertIteratorResult(2, false, iter.next());
521 assertIteratorResult(3, false, iter.next());
522 assertIteratorResult(4, false, iter.next());
523 assertIteratorIsClosed(iter);
527 function Test2(iter) { argument
528 assertThrows(function() { iter.throw(new Sentinel); }, Sentinel);
529 assertThrownIteratorIsClosed(iter);
533 function Test3(iter) { argument
534 assertIteratorResult(1, false, iter.next());
535 assertThrows(function() { iter.throw(new Sentinel); }, Sentinel);
536 assertThrownIteratorIsClosed(iter);
540 function Test4(iter) { argument
541 assertIteratorResult(1, false, iter.next());
542 assertIteratorResult(2, false, iter.next());
543 assertIteratorResult(3, false, iter.throw(new Sentinel));
544 assertThrows(function() { iter.next(); }, Sentinel);
545 assertThrownIteratorIsClosed(iter);
549 function Test5(iter) { argument
550 assertIteratorResult(1, false, iter.next());
551 assertIteratorResult(2, false, iter.next());
552 assertIteratorResult(3, false, iter.throw(new Sentinel));
553 assertThrows(function() { iter.throw(new Sentinel2); }, Sentinel2);
554 assertThrownIteratorIsClosed(iter);
558 function Test6(iter) { argument
559 assertIteratorResult(1, false, iter.next());
560 assertIteratorResult(2, false, iter.next());
561 assertIteratorResult(3, false, iter.next());
562 assertThrows(function() { iter.throw(new Sentinel); }, Sentinel);
563 assertThrownIteratorIsClosed(iter);
567 function Test7(iter) { argument
568 assertIteratorResult(1, false, iter.next());
569 assertIteratorResult(2, false, iter.next());
570 assertIteratorResult(3, false, iter.next());
571 assertIteratorResult(4, false, iter.next());
572 assertThrows(function() { iter.throw(new Sentinel); }, Sentinel);
573 assertThrownIteratorIsClosed(iter);
577 function Test8(iter) { argument
578 assertIteratorResult(1, false, iter.next());
579 assertIteratorResult(2, false, iter.next());
580 assertIteratorResult(3, false, iter.next());
581 assertIteratorResult(4, false, iter.next());
582 assertIteratorIsClosed(iter);
603 function Test1(iter) { argument
604 assertIteratorResult(1, false, iter.next());
605 assertIteratorResult(2, false, iter.next());
606 assertIteratorResult(3, false, iter.next());
607 assertIteratorResult(4, false, iter.next());
608 assertIteratorResult(5, false, iter.next());
609 assertIteratorIsClosed(iter);
613 function Test2(iter) { argument
614 assertThrows(function() { iter.throw(new Sentinel); }, Sentinel);
615 assertThrownIteratorIsClosed(iter);
619 function Test3(iter) { argument
620 assertIteratorResult(1, false, iter.next());
621 assertIteratorResult(4, false, iter.throw(new Sentinel));
622 assertThrows(function() { iter.next(); }, Sentinel);
623 assertThrownIteratorIsClosed(iter);
627 function Test4(iter) { argument
628 assertIteratorResult(1, false, iter.next());
629 assertIteratorResult(4, false, iter.throw(new Sentinel));
630 assertThrows(function() { iter.throw(new Sentinel2); }, Sentinel2);
631 assertThrownIteratorIsClosed(iter);
635 function Test5(iter) { argument
636 assertIteratorResult(1, false, iter.next());
637 assertIteratorResult(2, false, iter.next());
639 assertIteratorResult(exn, false, iter.throw(exn));
640 assertIteratorResult(3, false, iter.next());
641 assertIteratorResult(4, false, iter.next());
642 assertIteratorResult(5, false, iter.next());
643 assertIteratorIsClosed(iter);
647 function Test6(iter) { argument
648 assertIteratorResult(1, false, iter.next());
649 assertIteratorResult(2, false, iter.next());
651 assertIteratorResult(exn, false, iter.throw(exn));
652 assertIteratorResult(4, false, iter.throw(new Sentinel2));
653 assertThrows(function() { iter.next(); }, Sentinel2);
654 assertThrownIteratorIsClosed(iter);
658 function Test7(iter) { argument
659 assertIteratorResult(1, false, iter.next());
660 assertIteratorResult(2, false, iter.next());
662 assertIteratorResult(exn, false, iter.throw(exn));
663 assertIteratorResult(3, false, iter.next());
664 assertIteratorResult(4, false, iter.throw(new Sentinel2));
665 assertThrows(function() { iter.next(); }, Sentinel2);
666 assertThrownIteratorIsClosed(iter);
677 function* g() { yield iter.next(); }
678 var iter = g();
679 return iter.next();
682 function* g() { yield iter.next(42); }
683 var iter = g();
684 return iter.next();
687 function* g() { yield iter.throw(1); }
688 var iter = g();
689 return iter.next();