| 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 // 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 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 void streamClosed() { | 44 void streamClosed() { |
| 45 Expect.equals(BUFFERSIZE, received); | 45 Expect.equals(BUFFERSIZE, received); |
| 46 } | 46 } |
| 47 | 47 |
| 48 input.dataHandler = readData; | 48 input.dataHandler = readData; |
| 49 input.closeHandler = streamClosed; | 49 input.closeHandler = streamClosed; |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool written = output.write(data, 0, BUFFERSIZE, dataWritten); | 52 output.write(data); |
| 53 if (written) { | 53 dataWritten(); |
| 54 dataWritten(); | |
| 55 } | |
| 56 } | 54 } |
| 57 | 55 |
| 58 static void testMain() { | 56 static void testMain() { |
| 59 testStdout(); | 57 testStdout(); |
| 60 } | 58 } |
| 61 } | 59 } |
| 62 | 60 |
| 63 main() { | 61 main() { |
| 64 ProcessStdoutTest.testMain(); | 62 ProcessStdoutTest.testMain(); |
| 65 } | 63 } |
| OLD | NEW |