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 #import("dart:io"); | 5 #import("dart:io"); |
| 6 #import("dart:isolate"); |
6 | 7 |
7 void testEmptyListOutputStream1() { | 8 void testEmptyListOutputStream1() { |
8 OutputStream stream = new ListOutputStream(); | 9 OutputStream stream = new ListOutputStream(); |
9 Expect.equals(null, stream.contents()); | 10 Expect.equals(null, stream.contents()); |
10 stream.close(); | 11 stream.close(); |
11 Expect.equals(null, stream.contents()); | 12 Expect.equals(null, stream.contents()); |
12 Expect.throws(() { stream.write([0]); }); | 13 Expect.throws(() { stream.write([0]); }); |
13 } | 14 } |
14 | 15 |
15 | 16 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 84 |
84 donePort.receive((x,y) => donePort.close()); | 85 donePort.receive((x,y) => donePort.close()); |
85 } | 86 } |
86 | 87 |
87 main() { | 88 main() { |
88 testEmptyListOutputStream1(); | 89 testEmptyListOutputStream1(); |
89 testEmptyListOutputStream2(); | 90 testEmptyListOutputStream2(); |
90 testListOutputStream1(); | 91 testListOutputStream1(); |
91 testListOutputStream2(); | 92 testListOutputStream2(); |
92 } | 93 } |
OLD | NEW |