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

Side by Side Diff: tests/standalone/io/windows_file_system_async_links_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
« no previous file with comments | « tests/standalone/io/web_socket_test.dart ('k') | tests/standalone/io/zlib_test.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:expect/expect.dart';
7 import "dart:io"; 6 import "dart:io";
8 import "dart:isolate"; 7
8 import "package:async_helper/async_helper.dart";
9 import "package:expect/expect.dart";
9 10
10 11
11 class FutureExpect { 12 class FutureExpect {
12 static Future isTrue(Future<bool> result) => 13 static Future isTrue(Future<bool> result) =>
13 result.then((value) => Expect.isTrue(value)); 14 result.then((value) => Expect.isTrue(value));
14 static Future isFalse(Future<bool> result) => 15 static Future isFalse(Future<bool> result) =>
15 result.then((value) => Expect.isFalse(value)); 16 result.then((value) => Expect.isFalse(value));
16 static Future equals(expected, Future result) => 17 static Future equals(expected, Future result) =>
17 result.then((value) => Expect.equals(expected, value)); 18 result.then((value) => Expect.equals(expected, value));
18 static Future listEquals(expected, Future result) => 19 static Future listEquals(expected, Future result) =>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 FileSystemEntity.type(x, followLinks: false))) 93 FileSystemEntity.type(x, followLinks: false)))
93 .then((_) => FutureExpect.throws(new Link(y).target())) 94 .then((_) => FutureExpect.throws(new Link(y).target()))
94 .then((_) => temp.delete(recursive: true)); 95 .then((_) => temp.delete(recursive: true));
95 }); 96 });
96 } 97 }
97 98
98 99
99 main() { 100 main() {
100 // Links on other platforms are tested by file_system_[async_]links_test. 101 // Links on other platforms are tested by file_system_[async_]links_test.
101 if (Platform.operatingSystem == 'windows') { 102 if (Platform.operatingSystem == 'windows') {
102 ReceivePort keepAlive = new ReceivePort(); 103 asyncStart();
103 testJunctionTypeDelete().then((_) => keepAlive.close()); 104 testJunctionTypeDelete().then((_) => asyncEnd());
104 } 105 }
105 } 106 }
OLDNEW
« no previous file with comments | « tests/standalone/io/web_socket_test.dart ('k') | tests/standalone/io/zlib_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698