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

Unified Diff: tests/standalone/io/http_keep_alive_test.dart

Issue 13548002: Add Iterable.fold (and Stream.fold) which replace `reduce`. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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 | « tests/standalone/io/http_compression_test.dart ('k') | tests/standalone/io/http_proxy_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_keep_alive_test.dart
diff --git a/tests/standalone/io/http_keep_alive_test.dart b/tests/standalone/io/http_keep_alive_test.dart
index 30373e8c10681c8a02535953b542d8b7745c680b..ad20ea8af396407922ffb851e5d76c1de932a6da 100644
--- a/tests/standalone/io/http_keep_alive_test.dart
+++ b/tests/standalone/io/http_keep_alive_test.dart
@@ -14,7 +14,7 @@ Future getData(HttpClient client, int port, bool chunked, int length) {
return client.get("localhost", port, "/?chunked=$chunked&length=$length")
.then((request) => request.close())
.then((response) {
- return response.reduce(0, (bytes, data) => bytes + data.length)
+ return response.fold(0, (bytes, data) => bytes + data.length)
.then((bytes) {
Expect.equals(length, bytes);
});
« no previous file with comments | « tests/standalone/io/http_compression_test.dart ('k') | tests/standalone/io/http_proxy_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698