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

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

Issue 8365032: Process tests work across platforms. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More line endings. Created 9 years, 1 month 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
« no previous file with comments | « no previous file | tests/standalone/src/ProcessSegfaultTest.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #source("ProcessTestUtil.dart");
8
7 class ProcessExitTest { 9 class ProcessExitTest {
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", "99", "0"]); 13 const ["0", "0", "99", "0"]);
12 14
13 void exitHandler(int exitCode) { 15 void exitHandler(int exitCode) {
14 Expect.equals(exitCode, 99); 16 Expect.equals(exitCode, 99);
15 process.close(); 17 process.close();
16 } 18 }
17 19
18 process.exitHandler = exitHandler; 20 process.exitHandler = exitHandler;
19 process.start(); 21 process.start();
20 } 22 }
21 23
22 static void testMain() { 24 static void testMain() {
23 testExit(); 25 testExit();
24 } 26 }
25 } 27 }
26 28
27 main() { 29 main() {
28 ProcessExitTest.testMain(); 30 ProcessExitTest.testMain();
29 } 31 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/src/ProcessSegfaultTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698