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

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

Issue 8359033: Rename getters in process object (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 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
« no previous file with comments | « runtime/bin/process.dart ('k') | tests/standalone/src/ProcessStdoutTest.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 // VMOptions= 7 // VMOptions=
8 // VMOptions=--short_socket_read 8 // VMOptions=--short_socket_read
9 // VMOptions=--short_socket_write 9 // VMOptions=--short_socket_write
10 // VMOptions=--short_socket_read --short_socket_write 10 // VMOptions=--short_socket_read --short_socket_write
11 11
12 class ProcessStderrTest { 12 class ProcessStderrTest {
13 13
14 static void testExit() { 14 static void testExit() {
15 Process process = new Process("out/Debug_ia32/process_test", 15 Process process = new Process("out/Debug_ia32/process_test",
16 const ["1", "1", "99", "0"]); 16 const ["1", "1", "99", "0"]);
17 final int BUFFERSIZE = 10; 17 final int BUFFERSIZE = 10;
18 final int STARTCHAR = 65; 18 final int STARTCHAR = 65;
19 List<int> buffer = new List<int>(BUFFERSIZE); 19 List<int> buffer = new List<int>(BUFFERSIZE);
20 for (int i = 0; (i < BUFFERSIZE - 1); i++) { 20 for (int i = 0; (i < BUFFERSIZE - 1); i++) {
21 buffer[i] = STARTCHAR + i; 21 buffer[i] = STARTCHAR + i;
22 } 22 }
23 buffer[BUFFERSIZE - 1] = 10; 23 buffer[BUFFERSIZE - 1] = 10;
24 24
25 SocketInputStream input = process.stderrStream; 25 InputStream input = process.stderr;
26 SocketOutputStream output = process.stdinStream; 26 OutputStream output = process.stdin;
27 27
28 process.start(); 28 process.start();
29 29
30 List<int> readBuffer = new List<int>(BUFFERSIZE); 30 List<int> readBuffer = new List<int>(BUFFERSIZE);
31 31
32 void dataWritten() { 32 void dataWritten() {
33 void readData() { 33 void readData() {
34 for (int i = 0; i < BUFFERSIZE; i++) { 34 for (int i = 0; i < BUFFERSIZE; i++) {
35 Expect.equals(buffer[i], readBuffer[i]); 35 Expect.equals(buffer[i], readBuffer[i]);
36 } 36 }
(...skipping 12 matching lines...) Expand all
49 } 49 }
50 50
51 static void testMain() { 51 static void testMain() {
52 testExit(); 52 testExit();
53 } 53 }
54 } 54 }
55 55
56 main() { 56 main() {
57 ProcessStderrTest.testMain(); 57 ProcessStderrTest.testMain();
58 } 58 }
OLDNEW
« no previous file with comments | « runtime/bin/process.dart ('k') | tests/standalone/src/ProcessStdoutTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698