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

Side by Side Diff: test/utils.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_zip_test.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// Helper utilities for testing. 5 /// Helper utilities for testing.
6 library async.test.util;
7
8 import "dart:async"; 6 import "dart:async";
9 7
10 import "package:async/async.dart"; 8 import "package:async/async.dart";
11 import "package:test/test.dart"; 9 import "package:test/test.dart";
12 10
13 /// A zero-millisecond timer should wait until after all microtasks. 11 /// A zero-millisecond timer should wait until after all microtasks.
14 Future flushMicrotasks() => new Future.delayed(Duration.ZERO); 12 Future flushMicrotasks() => new Future.delayed(Duration.ZERO);
15 13
16 /// A generic unreachable callback function. 14 /// A generic unreachable callback function.
17 /// 15 ///
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 stream.listen(add, onError: addError, onDone: completer.complete); 76 stream.listen(add, onError: addError, onDone: completer.complete);
79 return completer.future; 77 return completer.future;
80 } 78 }
81 79
82 Future close() { 80 Future close() {
83 _isClosed = true; 81 _isClosed = true;
84 _doneCompleter.complete(new Future.microtask(_onDone)); 82 _doneCompleter.complete(new Future.microtask(_onDone));
85 return done; 83 return done;
86 } 84 }
87 } 85 }
OLDNEW
« no previous file with comments | « test/stream_zip_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698