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

Side by Side Diff: tests/standalone/src/ProcessStartExceptionTest.dart

Issue 9254026: Split dart:builtin into dart:builtin and dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment and add binaries. Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Process test program to test process communication. 5 // Process test program to test process communication.
6 6
7 #import("dart:io");
8
7 class ProcessStartExceptionTest { 9 class ProcessStartExceptionTest {
8 10
9 static void testStartError() { 11 static void testStartError() {
10 Process process = 12 Process process =
11 new Process.start("__path_to_something_that_should_not_exist__", 13 new Process.start("__path_to_something_that_should_not_exist__",
12 const []); 14 const []);
13 15
14 process.exitHandler = (int exitCode) { 16 process.exitHandler = (int exitCode) {
15 Expect.fail("exit handler called"); 17 Expect.fail("exit handler called");
16 }; 18 };
17 19
18 process.errorHandler = (ProcessException e) { 20 process.errorHandler = (ProcessException e) {
19 Expect.equals(2, e.errorCode); 21 Expect.equals(2, e.errorCode);
20 }; 22 };
21 } 23 }
22 } 24 }
23 25
24 main() { 26 main() {
25 ProcessStartExceptionTest.testStartError(); 27 ProcessStartExceptionTest.testStartError();
26 } 28 }
OLDNEW
« no previous file with comments | « tests/standalone/src/ProcessSegfaultTest.dart ('k') | tests/standalone/src/ProcessStdIOScript.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698