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

Side by Side Diff: tests/standalone/io/link_async_test.dart

Issue 23886004: Update dart:io tests to use asyncStart/asyncEnd (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 3 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
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";
6 import "dart:io";
7
8 import "package:async_helper/async_helper.dart";
5 import "package:expect/expect.dart"; 9 import "package:expect/expect.dart";
6 import "package:path/path.dart"; 10 import "package:path/path.dart";
7 import "dart:async";
8 import "dart:io";
9 import "dart:isolate";
10 11
11 // Test the dart:io Link class. 12 // Test the dart:io Link class.
12 13
13 class FutureExpect { 14 class FutureExpect {
14 static Future isTrue(Future<bool> result) => 15 static Future isTrue(Future<bool> result) =>
15 result.then((value) => Expect.isTrue(value)); 16 result.then((value) => Expect.isTrue(value));
16 static Future isFalse(Future<bool> result) => 17 static Future isFalse(Future<bool> result) =>
17 result.then((value) => Expect.isFalse(value)); 18 result.then((value) => Expect.isFalse(value));
18 static Future equals(expected, Future result) => 19 static Future equals(expected, Future result) =>
19 result.then((value) => Expect.equals(expected, value)); 20 result.then((value) => Expect.equals(expected, value));
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 Expect.equals('Found', v); 265 Expect.equals('Found', v);
265 } 266 }
266 }) 267 })
267 ); 268 );
268 } 269 }
269 } 270 }
270 return Future.wait(futures); 271 return Future.wait(futures);
271 } 272 }
272 273
273 main() { 274 main() {
274 ReceivePort keepAlive = new ReceivePort(); 275 asyncStart();
275 testCreate() 276 testCreate()
276 .then((_) => testCreateLoopingLink()) 277 .then((_) => testCreateLoopingLink())
277 .then((_) => testRename()) 278 .then((_) => testRename())
278 .then((_) => keepAlive.close()); 279 .then((_) => asyncEnd());
279 } 280 }
OLDNEW
« no previous file with comments | « tests/standalone/io/https_client_exception_test.dart ('k') | tests/standalone/io/platform_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698