Chromium Code Reviews| Index: tests/standalone/io/list_output_stream_test.dart |
| diff --git a/tests/standalone/io/list_output_stream_test.dart b/tests/standalone/io/list_output_stream_test.dart |
| index 812c4b3d3a3844b07e00347c682df4150abe2d19..748008bcfaac3690fca6c1c779c05d842b5761b0 100644 |
| --- a/tests/standalone/io/list_output_stream_test.dart |
| +++ b/tests/standalone/io/list_output_stream_test.dart |
| @@ -139,6 +139,25 @@ void testListOutputStream4() { |
| donePort.receive((x,y) => donePort.close()); |
| } |
| +void testListOutputStream5() { |
| + ListOutputStream stream = new ListOutputStream(); |
| + ReceivePort donePort = new ReceivePort(); |
| + List result = <int>[]; |
| + |
| + stream.onClosed = () { |
| + Expect.isTrue(stream.closed); |
|
Bill Hesse
2012/08/08 14:21:11
Why not check the contents here?
nweiz
2012/08/09 19:39:52
Done.
|
| + donePort.toSendPort().send(null); |
| + }; |
| + |
| + Expect.isFalse(stream.closed); |
| + stream.write([1, 2, 3]); |
| + Expect.isFalse(stream.closed); |
| + stream.close(); |
| + Expect.isTrue(stream.closed); |
| + |
|
Bill Hesse
2012/08/08 14:21:11
Add a test that .write throws an exception here?
nweiz
2012/08/09 19:39:52
Done.
|
| + donePort.receive((x,y) => donePort.close()); |
| +} |
| + |
| main() { |
| testEmptyListOutputStream1(); |
| testEmptyListOutputStream2(); |
| @@ -146,4 +165,5 @@ main() { |
| testListOutputStream2(); |
| testListOutputStream3(); |
| testListOutputStream4(); |
| + testListOutputStream5(); |
| } |