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

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

Issue 15883003: Remove ProcessOptions and make the options named arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments cleanup. Created 7 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_invalid_arguments_test.dart
diff --git a/tests/standalone/io/process_invalid_arguments_test.dart b/tests/standalone/io/process_invalid_arguments_test.dart
index 8dc60d13273cb8f5dddaed6866e9b7f52a726147..bbbc6318bf636e7afd92e2378ab8a1ebddee2f03 100644
--- a/tests/standalone/io/process_invalid_arguments_test.dart
+++ b/tests/standalone/io/process_invalid_arguments_test.dart
@@ -14,24 +14,15 @@ void main() {
(e) => e is ArgumentError);
Expect.throws(() => Process.start("true", ["asdf", 1]),
(e) => e is ArgumentError);
- Expect.throws(() => Process.run(["true"], [], null),
+;
+ Expect.throws(() => Process.start("true", [], workingDirectory: 23),
(e) => e is ArgumentError);
- Expect.throws(() => Process.run("true", "asdf", null),
- (e) => e is ArgumentError);
- Expect.throws(() => Process.run("true", ["asdf", 1], null),
- (e) => e is ArgumentError);
- var options = new ProcessOptions();
- options.workingDirectory = 23;
- Expect.throws(() => Process.start("true", [], options),
- (e) => e is ArgumentError);
- Expect.throws(() => Process.run("true", [], options),
- (e) => e is ArgumentError);
- options = new ProcessOptions();
- options.stdoutEncoding = 23;
- Expect.throws(() => Process.run("true", [], options),
- (e) => e is ArgumentError);
- options = new ProcessOptions();
- options.stderrEncoding = 23;
- Expect.throws(() => Process.run("true", [], options),
+ Expect.throws(() => Process.run("true", [], workingDirectory: 23),
(e) => e is ArgumentError);
+
+ Process.run("true", [], stdoutEncoding: 23)
+ .then((_) => Expect.fail("expected error"), onError: (_) {});
+
+ Process.run("true", [], stderrEncoding: 23)
+ .then((_) => Expect.fail("expected error"), onError: (_) {});
}

Powered by Google App Engine
This is Rietveld 408576698