Index: test/mjsunit/harmony/generators-iteration.js |
diff --git a/test/mjsunit/harmony/generators-iteration.js b/test/mjsunit/harmony/generators-iteration.js |
index 09a4cc50d6472be689745f21bd6a63bd4fe07d70..b64d583b7b86a82a4e44fb224cf182e2c526a2a9 100644 |
--- a/test/mjsunit/harmony/generators-iteration.js |
+++ b/test/mjsunit/harmony/generators-iteration.js |
@@ -239,6 +239,32 @@ function TestReceivers() { |
// TestReceivers(); |
TestGenerator( |
+ function* g20() { yield (1 + (yield 2) + 3); }, |
+ [2, NaN, undefined], |
+ "foo", |
+ [2, "1foo3", undefined]); |
+ |
+TestGenerator( |
+ function* g21() { return (1 + (yield 2) + 3); }, |
+ [2, NaN], |
+ "foo", |
+ [2, "1foo3"]); |
+ |
+TestGenerator( |
+ function* g22() { yield (1 + (yield 2) + 3); yield (4 + (yield 5) + 6); }, |
+ [2, NaN, 5, NaN, undefined], |
+ "foo", |
+ [2, "1foo3", 5, "4foo6", undefined]); |
+ |
+TestGenerator( |
+ function* g23() { |
+ return (yield (1 + (yield 2) + 3)) + (yield (4 + (yield 5) + 6)); |
+ }, |
+ [2, NaN, 5, NaN, NaN], |
+ "foo", |
+ [2, "1foo3", 5, "4foo6", "foofoo"]); |
+ |
+TestGenerator( |
function* g() { |
var x = 1; |
yield x; |