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

Unified Diff: tests/standalone/io/secure_multiple_client_server_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
Index: tests/standalone/io/secure_multiple_client_server_test.dart
diff --git a/tests/standalone/io/secure_multiple_client_server_test.dart b/tests/standalone/io/secure_multiple_client_server_test.dart
index 27527b15ff2eb6d99de7fcb909302e0e7d0f525e..4700fcd45d2b094d7fe598d81e7e2681ee397cf3 100644
--- a/tests/standalone/io/secure_multiple_client_server_test.dart
+++ b/tests/standalone/io/secure_multiple_client_server_test.dart
@@ -20,7 +20,7 @@ Future<SecureServerSocket> startServer() {
5,
CERTIFICATE).then((server) {
server.listen((SecureSocket client) {
- client.reduce(<int>[], (message, data) => message..addAll(data))
+ client.fold(<int>[], (message, data) => message..addAll(data))
.then((message) {
String received = new String.fromCharCodes(message);
Expect.isTrue(received.contains("Hello from client "));
@@ -37,7 +37,7 @@ Future testClient(server, name) {
return SecureSocket.connect(HOST_NAME, server.port).then((socket) {
socket.writeBytes("Hello from client $name".codeUnits);
socket.close();
- return socket.reduce(<int>[], (message, data) => message..addAll(data))
+ return socket.fold(<int>[], (message, data) => message..addAll(data))
.then((message) {
Expect.listEquals("Welcome, client $name".codeUnits, message);
return server;
« no previous file with comments | « tests/standalone/io/secure_client_server_test.dart ('k') | tests/standalone/io/secure_session_resume_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698