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

Unified Diff: tests/standalone/io/process_run_output_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_run_output_test.dart
diff --git a/tests/standalone/io/process_run_output_test.dart b/tests/standalone/io/process_run_output_test.dart
index c0e1796cea07237df2b8c852b3caa63ce8d35367..4d8ae846b9d77a132a8446dbf5571ede6861b3f9 100644
--- a/tests/standalone/io/process_run_output_test.dart
+++ b/tests/standalone/io/process_run_output_test.dart
@@ -31,19 +31,21 @@ test(scriptFile, encoding, stream) {
var options = new ProcessOptions();
if (stream == 'stdout') {
options.stdoutEncoding = enc;
- new Process.run(new Options().executable, [scriptFile, encoding, stream],
- options, (exit, out, err) {
- Expect.equals(exit, 0);
- Expect.equals(err, '');
- checkOutput(encoding, out);
+ Process.run(new Options().executable,
+ [scriptFile, encoding, stream],
+ options). then((result) {
+ Expect.equals(result.exitCode, 0);
+ Expect.equals(result.stderr, '');
+ checkOutput(encoding, result.stdout);
});
} else {
options.stderrEncoding = enc;
- new Process.run(new Options().executable, [scriptFile, encoding, stream],
- options, (exit, out, err) {
- Expect.equals(exit, 0);
- Expect.equals(out, '');
- checkOutput(encoding, err);
+ Process.run(new Options().executable,
+ [scriptFile, encoding, stream],
+ options).then((result) {
+ Expect.equals(result.exitCode, 0);
+ Expect.equals(result.stdout, '');
+ checkOutput(encoding, result.stderr);
});
}
}
« no previous file with comments | « tests/standalone/io/process_invalid_arguments_test.dart ('k') | tests/standalone/io/process_segfault_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698