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

Unified Diff: tests/standalone/io/platform_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/link_async_test.dart ('k') | tests/standalone/io/process_environment_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/platform_test.dart
diff --git a/tests/standalone/io/platform_test.dart b/tests/standalone/io/platform_test.dart
index 1fdad2ba292a149c1ce50e98c01f573b3e6f274e..6c009e889c0013f0b924338e6296407603169ccd 100644
--- a/tests/standalone/io/platform_test.dart
+++ b/tests/standalone/io/platform_test.dart
@@ -2,11 +2,13 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import "package:expect/expect.dart";
import "dart:async";
import "dart:io";
import "dart:isolate";
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
+
test() {
Expect.isTrue(Platform.numberOfProcessors > 0);
var os = Platform.operatingSystem;
@@ -60,7 +62,7 @@ void f() {
}
testIsolate() {
- var port = new ReceivePort();
+ asyncStart();
var sendPort = spawnFunction(f);
Future.wait([sendPort.call("Platform.executable"),
sendPort.call("Platform.script"),
@@ -77,7 +79,7 @@ testIsolate() {
Expect.isTrue(uri.path.endsWith('tests/standalone/io/platform_test.dart'));
Expect.equals(Platform.packageRoot, results[2]);
Expect.listEquals(Platform.executableArguments, results[3]);
- sendPort.call("close").then((_) => port.close());
+ sendPort.call("close").then((_) => asyncEnd());
});
}
« no previous file with comments | « tests/standalone/io/link_async_test.dart ('k') | tests/standalone/io/process_environment_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698