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