BackwardsGraph needs to consider back edges as the backward's root successor
[WebKit-https.git] / JSTests / es6 / generators_yield_star_generator_instances.js
1 function test() {
2
3 var iterator = (function * generator() {
4   yield * (function*(){ yield 5; yield 6; yield 7; }());
5 }());
6 var item = iterator.next();
7 var passed = item.value === 5 && item.done === false;
8 item = iterator.next();
9 passed    &= item.value === 6 && item.done === false;
10 item = iterator.next();
11 passed    &= item.value === 7 && item.done === false;
12 item = iterator.next();
13 passed    &= item.value === undefined && item.done === true;
14 return passed;
15       
16 }
17
18 if (!test())
19     throw new Error("Test failed");
20