Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1675)

Unified Diff: test/mjsunit/harmony/generators-iteration.js

Issue 16136011: Generator object "next" method takes optional send value (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased onto master Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/harmony/generators-objects.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/generators-iteration.js
diff --git a/test/mjsunit/harmony/generators-iteration.js b/test/mjsunit/harmony/generators-iteration.js
index e717f1b4a3207518d69a14506f1f9827b5bd406a..01facd085c27ad41660fa8c5af56657da4b3afde 100644
--- a/test/mjsunit/harmony/generators-iteration.js
+++ b/test/mjsunit/harmony/generators-iteration.js
@@ -64,9 +64,9 @@ function TestGenerator(g, expected_values_for_next,
for (var i = 0; i < expected_values_for_send.length; i++) {
assertIteratorResult(expected_values_for_send[i],
i == expected_values_for_send.length - 1,
- iter.send(send_val));
+ iter.next(send_val));
}
- assertThrows(function() { iter.send(send_val); }, Error);
+ assertThrows(function() { iter.next(send_val); }, Error);
}
function testThrow(thunk) {
for (var i = 0; i < expected_values_for_next.length; i++) {
@@ -572,7 +572,7 @@ function TestRecursion() {
return iter.next();
}
function TestSendRecursion() {
- function* g() { yield iter.send(42); }
+ function* g() { yield iter.next(42); }
var iter = g();
return iter.next();
}
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/harmony/generators-objects.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698