Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1680)

Unified Diff: tests/standalone/io/file_output_stream_test.dart

Issue 10832188: Add an OutputStream.closed getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/standalone/io/file_output_stream_test.dart
diff --git a/tests/standalone/io/file_output_stream_test.dart b/tests/standalone/io/file_output_stream_test.dart
index 42d3c1e8f0fbe0497335fd4faf322a2b47475a55..75e2732a81cd9211a7c5a71a5cdb466ebbaa2bcf 100644
--- a/tests/standalone/io/file_output_stream_test.dart
+++ b/tests/standalone/io/file_output_stream_test.dart
@@ -21,8 +21,11 @@ void testOpenOutputStreamSync() {
file.createSync();
OutputStream x = file.openOutputStream();
x.write([65, 66, 67]);
+ Expect.isFalse(x.closed);
x.close();
+ Expect.isTrue(x.closed);
Bill Hesse 2012/08/08 14:21:11 This is different from an InputStream, where we wa
Bill Hesse 2012/08/08 14:21:11 Should you test that write() throws an exception h
nweiz 2012/08/09 19:39:52 Yes, but currently it would fail that test due to
x.onClosed = () {
+ Expect.isTrue(x.closed);
file.deleteSync();
done.toSendPort().send("done");
};

Powered by Google App Engine
This is Rietveld 408576698