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