OLD | NEW |
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 #source("ProcessTestUtil.dart"); |
| 8 |
7 class ProcessSegfaultTest { | 9 class ProcessSegfaultTest { |
8 | 10 |
9 static void testExit() { | 11 static void testExit() { |
10 Process process = new Process("out/Debug_ia32/process_test", | 12 Process process = new Process(getProcessTestFileName(), |
11 const ["0", "0", "1", "1"]); | 13 const ["0", "0", "1", "1"]); |
12 | 14 |
13 void exitHandler(int exitCode) { | 15 void exitHandler(int exitCode) { |
14 process.close(); | 16 process.close(); |
15 } | 17 } |
16 | 18 |
17 process.setExitHandler(exitHandler); | 19 process.setExitHandler(exitHandler); |
18 process.start(); | 20 process.start(); |
19 } | 21 } |
20 | 22 |
21 static void testMain() { | 23 static void testMain() { |
22 testExit(); | 24 testExit(); |
23 } | 25 } |
24 } | 26 } |
25 | 27 |
26 main() { | 28 main() { |
27 ProcessSegfaultTest.testMain(); | 29 ProcessSegfaultTest.testMain(); |
28 } | 30 } |
OLD | NEW |