OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // Testing file input stream, VM-only, standalone test. | 4 // Testing file input stream, VM-only, standalone test. |
5 | 5 |
6 #import("dart:io"); | 6 #import("dart:io"); |
| 7 #import("dart:isolate"); |
7 | 8 |
8 void testOpenOutputStreamSync() { | 9 void testOpenOutputStreamSync() { |
9 Directory tempDirectory = new Directory(''); | 10 Directory tempDirectory = new Directory(''); |
10 | 11 |
11 // Create a port for waiting on the final result of this test. | 12 // Create a port for waiting on the final result of this test. |
12 ReceivePort done = new ReceivePort(); | 13 ReceivePort done = new ReceivePort(); |
13 done.receive((message, replyTo) { | 14 done.receive((message, replyTo) { |
14 tempDirectory.deleteSync(); | 15 tempDirectory.deleteSync(); |
15 done.close(); | 16 done.close(); |
16 }); | 17 }); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 }; | 107 }; |
107 }; | 108 }; |
108 } | 109 } |
109 | 110 |
110 | 111 |
111 main() { | 112 main() { |
112 testOpenOutputStreamSync(); | 113 testOpenOutputStreamSync(); |
113 testOpenOutputStreamAsync(); | 114 testOpenOutputStreamAsync(); |
114 testOutputStreamNoPendingWrite(); | 115 testOutputStreamNoPendingWrite(); |
115 } | 116 } |
OLD | NEW |