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

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

Issue 20745006: Add a flush operations to IOSink (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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_test.dart
diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
index 6a16efcfff93b78ca48d132e886b9ffe3a536d6d..08a071137edba07c33079fc369465ab82d8fbdff 100644
--- a/tests/standalone/io/file_test.dart
+++ b/tests/standalone/io/file_test.dart
@@ -104,7 +104,7 @@ class FileTest {
var file2 = new File(outFilename);
var output = file2.openWrite();
output.add(buffer);
- output.close();
+ output.flush().then((_) => output.close());
output.done.then((_) {
// Now read the contents of the file just written.
List<int> buffer2 = new List<int>();
@@ -143,7 +143,7 @@ class FileTest {
IOSink output = file.openWrite();
output.add(buffer);
output.add(buffer);
- output.close();
+ output.flush().then((_) => output.close());
output.done.then((_) {
Stream input = file.openRead();
int position = 0;

Powered by Google App Engine
This is Rietveld 408576698