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

Unified Diff: tests/standalone/src/FileInputStreamTest.dart

Issue 9474004: Make FileInputStream and FileOutputStream actually asynchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove accidental edit Created 8 years, 10 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/src/FileInputStreamTest.dart
diff --git a/tests/standalone/src/FileInputStreamTest.dart b/tests/standalone/src/FileInputStreamTest.dart
index c2d2aad8b0e60ae628bb2d32a7f5a1f11d9353a1..b1858887efafa9043e469b31aa9315d745e132e2 100644
--- a/tests/standalone/src/FileInputStreamTest.dart
+++ b/tests/standalone/src/FileInputStreamTest.dart
@@ -32,7 +32,7 @@ void testInputStreamAsync() {
InputStream x = (new File(fileName)).openInputStreamSync();
var byteCount = 0;
x.dataHandler = () {
- Expect.equals(expected[byteCount], x.read(1)[0]);
+ Expect.equals(expected[byteCount], x.read(1)[0]);
byteCount++;
};
x.closeHandler = () {
@@ -68,15 +68,17 @@ void testChunkedInputStream() {
File file = new File(fileName);
ChunkedInputStream x = new ChunkedInputStream(file.openInputStreamSync());
x.chunkSize = 9;
- List<int> chunk = x.read();
- Expect.equals(9, chunk.length);
- x.chunkSize = 5;
- chunk = x.read();
- Expect.equals(5, chunk.length);
- chunk = x.read();
- Expect.equals(5, chunk.length);
- chunk = x.read();
- Expect.equals(null, chunk);
+ x.dataHandler = () {
+ List<int> chunk = x.read();
+ Expect.equals(9, chunk.length);
+ x.chunkSize = 5;
Søren Gjesse 2012/02/28 07:40:25 I guess that this test is actually wrong, as the d
Mads Ager (google) 2012/02/28 08:21:00 Thanks. Done.
+ chunk = x.read();
+ Expect.equals(5, chunk.length);
+ chunk = x.read();
+ Expect.equals(5, chunk.length);
+ chunk = x.read();
+ Expect.equals(null, chunk);
+ };
}

Powered by Google App Engine
This is Rietveld 408576698