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

Side by Side Diff: test/stream_zip_test.dart

Issue 1777453002: Modernize the package's style. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Code review changes Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « test/stream_group_test.dart ('k') | test/utils.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:async"; 5 import "dart:async";
6 import "package:async/stream_zip.dart"; 6
7 import "package:async/async.dart";
7 import "package:test/test.dart"; 8 import "package:test/test.dart";
8 9
9 /// Create an error with the same values as [base], except that it throwsA 10 /// Create an error with the same values as [base], except that it throwsA
10 /// when seeing the value [errorValue]. 11 /// when seeing the value [errorValue].
11 Stream streamError(Stream base, int errorValue, error) { 12 Stream streamError(Stream base, int errorValue, error) {
12 return base.map((x) => (x == errorValue) ? throw error : x); 13 return base.map((x) => (x == errorValue) ? throw error : x);
13 } 14 }
14 15
15 /// Make a [Stream] from an [Iterable] by adding events to a stream controller 16 /// Make a [Stream] from an [Iterable] by adding events to a stream controller
16 /// at periodic intervals. 17 /// at periodic intervals.
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } else if (ctr == 2) { 227 } else if (ctr == 2) {
227 sub.pause(); 228 sub.pause();
228 new Future.delayed(const Duration(milliseconds: 25)).then((_) { 229 new Future.delayed(const Duration(milliseconds: 25)).then((_) {
229 sub.resume(); 230 sub.resume();
230 }); 231 });
231 } 232 }
232 ctr++; 233 ctr++;
233 }, count: 4)); 234 }, count: 4));
234 }); 235 });
235 } 236 }
OLDNEW
« no previous file with comments | « test/stream_group_test.dart ('k') | test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698