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

Unified Diff: tests/standalone/src/ProcessInvalidArgumentsTest.dart

Issue 9024008: Change the process API to be completely asynchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add binaries. Created 9 years 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/src/ProcessExitTest.dart ('k') | tests/standalone/src/ProcessSegfaultTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/ProcessInvalidArgumentsTest.dart
diff --git a/tests/standalone/src/ProcessInvalidArgumentsTest.dart b/tests/standalone/src/ProcessInvalidArgumentsTest.dart
index 79c161b9ea7eef8fb0c4316e2979303cb7924bf6..f02a7bc9aab6d95c69ca67fe48d644cc9f0d5f7a 100644
--- a/tests/standalone/src/ProcessInvalidArgumentsTest.dart
+++ b/tests/standalone/src/ProcessInvalidArgumentsTest.dart
@@ -4,35 +4,11 @@
//
// Process test program to test that invalid arguments throw exceptions.
-void testNonStringPath() {
- try {
- Process p = new Process(["true"], []);
- Expect.fail("Did not throw exception");
- } catch(var e) {
- Expect.isTrue(e is ProcessException, "Wrong exception type: $e");
- }
-}
-
-void testNonListArguments() {
- try {
- Process p = new Process("true", "asdf");
- Expect.fail("Did not throw exception");
- } catch(var e) {
- Expect.isTrue(e is ProcessException, "Wrong exception type: $e");
- }
-}
-
-void testNonStringArgument() {
- try {
- Process p = new Process("true", ["asdf", 1]);
- Expect.fail("Did not throw exception");
- } catch(var e) {
- Expect.isTrue(e is ProcessException, "Wrong exception type: $e");
- }
-}
-
void main() {
- testNonStringPath();
- testNonListArguments();
- testNonStringArgument();
+ Expect.throws(() => new Process.start(["true"], []),
+ (e) => e is ProcessException);
+ Expect.throws(() => new Process.start("true", "asdf"),
+ (e) => e is ProcessException);
+ Expect.throws(() => new Process.start("true", ["asdf", 1]),
+ (e) => e is ProcessException);
}
« no previous file with comments | « tests/standalone/src/ProcessExitTest.dart ('k') | tests/standalone/src/ProcessSegfaultTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698