| Index: test/mjsunit/harmony/generators-iteration.js
|
| diff --git a/test/mjsunit/harmony/generators-iteration.js b/test/mjsunit/harmony/generators-iteration.js
|
| index d120ac7b3b12d09bada31181734c91156272f109..274718c59ddb9fe329d5707dc289dea8bd1d276c 100644
|
| --- a/test/mjsunit/harmony/generators-iteration.js
|
| +++ b/test/mjsunit/harmony/generators-iteration.js
|
| @@ -320,6 +320,28 @@ TestGenerator(
|
| "foo",
|
| [2, "1foo3", 5, "4foo6", "foofoo"]);
|
|
|
| +// Generator function instances.
|
| +TestGenerator(GeneratorFunction(),
|
| + [undefined],
|
| + "foo",
|
| + [undefined]);
|
| +
|
| +TestGenerator(new GeneratorFunction(),
|
| + [undefined],
|
| + "foo",
|
| + [undefined]);
|
| +
|
| +TestGenerator(GeneratorFunction('yield 1;'),
|
| + [1, undefined],
|
| + "foo",
|
| + [1, undefined]);
|
| +
|
| +TestGenerator(
|
| + function() { return GeneratorFunction('x', 'y', 'yield x + y;')(1, 2) },
|
| + [3, undefined],
|
| + "foo",
|
| + [3, undefined]);
|
| +
|
| function TestTryCatch() {
|
| function* g() { yield 1; try { yield 2; } catch (e) { yield e; } yield 3; }
|
| function Sentinel() {}
|
|
|