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

Unified Diff: tests/standalone/io/process_exit_test.dart

Issue 10392023: Change dart:io to use Future for one-shot operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding stable test binaries Created 8 years, 7 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
Index: tests/standalone/io/process_exit_test.dart
diff --git a/tests/standalone/io/process_exit_test.dart b/tests/standalone/io/process_exit_test.dart
index 45105cf4d2070a4ef396fbc490d068934e33b7e4..107a933070444fb352b37aeceff512a30046e2de 100644
--- a/tests/standalone/io/process_exit_test.dart
+++ b/tests/standalone/io/process_exit_test.dart
@@ -9,8 +9,8 @@
#source("process_test_util.dart");
testExit() {
- Process process = new Process.start(getProcessTestFileName(),
- const ["0", "0", "99", "0"]);
+ Process process = Process.start(getProcessTestFileName(),
+ const ["0", "0", "99", "0"]);
process.onExit = (int exitCode) {
Expect.equals(exitCode, 99);
@@ -19,13 +19,11 @@ testExit() {
}
testExitRun() {
- Process process = new Process.run(getProcessTestFileName(),
- const ["0", "0", "99", "0"],
- null,
- (exit, out, err) {
- Expect.equals(exit, 99);
- Expect.equals(out, '');
- Expect.equals(err, '');
+ Process.run(getProcessTestFileName(),
+ const ["0", "0", "99", "0"]).then((result) {
+ Expect.equals(result.exitCode, 99);
+ Expect.equals(result.stdout, '');
+ Expect.equals(result.stderr, '');
});
}
« no previous file with comments | « tests/standalone/io/process_exit_negative_test.dart ('k') | tests/standalone/io/process_invalid_arguments_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698