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

Side by Side Diff: pkg/async_helper/lib/async_helper.dart

Issue 815773002: Add cleanUp function to Future.wait. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 5 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/async/future.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 /// This library is used for testing asynchronous tests. 5 /// This library is used for testing asynchronous tests.
6 /// If a test is asynchronous, it needs to notify the testing driver 6 /// If a test is asynchronous, it needs to notify the testing driver
7 /// about this (otherwise tests may get reported as passing [after main() 7 /// about this (otherwise tests may get reported as passing [after main()
8 /// finished] even if the asynchronous operations fail). 8 /// finished] even if the asynchronous operations fail).
9 /// Tests which can't use the unittest framework should use the helper functions 9 /// Tests which can't use the unittest framework should use the helper functions
10 /// in this library. 10 /// in this library.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void asyncSuccess(_) => asyncEnd(); 84 void asyncSuccess(_) => asyncEnd();
85 85
86 /** 86 /**
87 * Helper method for performing asynchronous tests involving [:Future:]. 87 * Helper method for performing asynchronous tests involving [:Future:].
88 * 88 *
89 * [f] must return a [:Future:] for the test computation. 89 * [f] must return a [:Future:] for the test computation.
90 */ 90 */
91 void asyncTest(f()) { 91 void asyncTest(f()) {
92 asyncStart(); 92 asyncStart();
93 f().then(asyncSuccess); 93 f().then(asyncSuccess);
94 } 94 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/async/future.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698