| Index: tests/standalone/src/ProcessStartExceptionTest.dart
|
| diff --git a/tests/standalone/src/ProcessStartExceptionTest.dart b/tests/standalone/src/ProcessStartExceptionTest.dart
|
| index 1446ee87f7f698bcc26c135d620bc51447e88ee6..ef63a7beda9d5b5242b13fbd5764745e98845239 100644
|
| --- a/tests/standalone/src/ProcessStartExceptionTest.dart
|
| +++ b/tests/standalone/src/ProcessStartExceptionTest.dart
|
| @@ -6,34 +6,21 @@
|
|
|
| class ProcessStartExceptionTest {
|
|
|
| - static void testStartException() {
|
| + static void testStartError() {
|
| Process process =
|
| - new Process("__path_to_something_that_hopefully_does_not_exist__",
|
| - const []);
|
| + new Process.start("__path_to_something_that_should_not_exist__",
|
| + const []);
|
|
|
| - void exitHandler(int exitCode) {
|
| - exitHandlerCalled = false;
|
| - }
|
| + process.exitHandler = (int exitCode) {
|
| + Expect.fail("exit handler called");
|
| + };
|
|
|
| - process.exitHandler = exitHandler;
|
| - try {
|
| - process.start();
|
| - } catch (ProcessException e) {
|
| - errorCode = e.errorCode;
|
| - }
|
| + process.errorHandler = (ProcessException e) {
|
| + Expect.equals(2, e.errorCode);
|
| + };
|
| }
|
| -
|
| - static void testMain() {
|
| - exitHandlerCalled = false;
|
| - testStartException();
|
| - Expect.equals(2, errorCode);
|
| - Expect.equals(false, exitHandlerCalled);
|
| - }
|
| -
|
| - static int errorCode;
|
| - static bool exitHandlerCalled;
|
| }
|
|
|
| main() {
|
| - ProcessStartExceptionTest.testMain();
|
| + ProcessStartExceptionTest.testStartError();
|
| }
|
|
|