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

Unified Diff: tests/standalone/io/zlib_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/string_decoder_test.dart ('k') | tools/dom/src/CssClassSet.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/zlib_test.dart
diff --git a/tests/standalone/io/zlib_test.dart b/tests/standalone/io/zlib_test.dart
index 87626f11f71873ca204068eb01efc765749e3d66..0c50fc3a9096897235b7459019b1544414a04f45 100644
--- a/tests/standalone/io/zlib_test.dart
+++ b/tests/standalone/io/zlib_test.dart
@@ -12,7 +12,7 @@ void testZLibDeflate() {
var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var controller = new StreamController();
controller.stream.transform(new ZLibDeflater(gzip: false, level: level))
- .reduce([], (buffer, data) {
+ .fold([], (buffer, data) {
buffer.addAll(data);
return buffer;
})
@@ -52,7 +52,7 @@ void testZLibDeflateEmpty() {
var port = new ReceivePort();
var controller = new StreamController();
controller.stream.transform(new ZLibDeflater(gzip: false, level: 6))
- .reduce([], (buffer, data) {
+ .fold([], (buffer, data) {
buffer.addAll(data);
return buffer;
})
@@ -70,7 +70,7 @@ void testZLibDeflateGZip() {
var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var controller = new StreamController();
controller.stream.transform(new ZLibDeflater())
- .reduce([], (buffer, data) {
+ .fold([], (buffer, data) {
buffer.addAll(data);
return buffer;
})
@@ -116,7 +116,7 @@ void testZLibInflate() {
controller.stream
.transform(new ZLibDeflater(gzip: gzip, level: level))
.transform(new ZLibInflater())
- .reduce([], (buffer, data) {
+ .fold([], (buffer, data) {
buffer.addAll(data);
return buffer;
})
« no previous file with comments | « tests/standalone/io/string_decoder_test.dart ('k') | tools/dom/src/CssClassSet.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698