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

Side by Side Diff: tests/standalone/io/file_test.dart

Issue 12313057: Remove old InputStream and OutputStream classes from dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | tests/standalone/io/http_date_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Dart test program for testing file I/O. 5 // Dart test program for testing file I/O.
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 }); 69 });
70 } 70 }
71 71
72 // Test for file read and write functionality. 72 // Test for file read and write functionality.
73 static void testReadWriteStream() { 73 static void testReadWriteStream() {
74 asyncTestStarted(); 74 asyncTestStarted();
75 75
76 // Read a file. 76 // Read a file.
77 String inFilename = getFilename("tests/vm/data/fixed_length_file"); 77 String inFilename = getFilename("tests/vm/data/fixed_length_file");
78 File file; 78 File file;
79 InputStream input;
80 int bytesRead; 79 int bytesRead;
81 80
82 var file1 = new File(inFilename); 81 var file1 = new File(inFilename);
83 List<int> buffer = new List<int>(); 82 List<int> buffer = new List<int>();
84 file1.openRead().listen( 83 file1.openRead().listen(
85 (d) { 84 (d) {
86 buffer.addAll(d); 85 buffer.addAll(d);
87 }, 86 },
88 onDone: () { 87 onDone: () {
89 Expect.equals(42, buffer.length); 88 Expect.equals(42, buffer.length);
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 testDirectorySync(); 1221 testDirectorySync();
1223 testWriteStringUtf8(); 1222 testWriteStringUtf8();
1224 testWriteStringUtf8Sync(); 1223 testWriteStringUtf8Sync();
1225 }); 1224 });
1226 } 1225 }
1227 } 1226 }
1228 1227
1229 main() { 1228 main() {
1230 FileTest.testMain(); 1229 FileTest.testMain();
1231 } 1230 }
OLDNEW
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | tests/standalone/io/http_date_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698