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

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: Updated patch Created 7 years, 2 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 3ecb0816c0896a35a1a88946618c8081155a0a1c..48b54a6011b9726f3c96091e8b5d87cdc50f5f83 100644
--- a/tests/standalone/io/file_test.dart
+++ b/tests/standalone/io/file_test.dart
@@ -108,7 +108,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>();
@@ -147,7 +147,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