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); |