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

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

Issue 233193004: Fix File:openRead and file_input_stream_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_input_stream_test.dart
diff --git a/tests/standalone/io/file_input_stream_test.dart b/tests/standalone/io/file_input_stream_test.dart
index b1f03369b896ffe507985f2bc8b9fc8e6512a056..0662c951bc864549096d964752fd16d866187c77 100644
--- a/tests/standalone/io/file_input_stream_test.dart
+++ b/tests/standalone/io/file_input_stream_test.dart
@@ -209,20 +209,18 @@ void testInputStreamBadOffset() {
var file = new File('${temp.path}/input_stream_bad_offset.txt');
var originalLength = writeLongFileSync(file);
var streamedBytes = 0;
+ bool error = false;
file.openRead(start, end).listen(
(d) {
streamedBytes += d.length;
},
onDone: () {
- if (temp.existsSync()) {
- temp.deleteSync(recursive: true);
- }
+ Expect.isTrue(error);
+ temp.deleteSync(recursive: true);
+ asyncEnd();
},
onError: (e) {
- if (temp.existsSync()) {
- temp.deleteSync(recursive: true);
- }
- asyncEnd();
+ error = true;
});
}
test(-1, null);
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698