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

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

Issue 14150002: Remove StreamSink(replaced by EventSink) and make IOSink extend EventSink. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/file_output_stream_test.dart ('k') | tests/standalone/io/file_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "dart:io"; 6 import "dart:io";
7 import "dart:isolate"; 7 import "dart:isolate";
8 8
9 9
10 createLink(String dst, String link, void callback()) { 10 createLink(String dst, String link, void callback()) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 95
96 testFileWriteRead() { 96 testFileWriteRead() {
97 var temp = new Directory('').createTempSync(); 97 var temp = new Directory('').createTempSync();
98 var x = '${temp.path}${Platform.pathSeparator}x'; 98 var x = '${temp.path}${Platform.pathSeparator}x';
99 var y = '${temp.path}${Platform.pathSeparator}y'; 99 var y = '${temp.path}${Platform.pathSeparator}y';
100 new File(x).createSync(); 100 new File(x).createSync();
101 createLink(x, y, () { 101 createLink(x, y, () {
102 var data = "asdf".codeUnits; 102 var data = "asdf".codeUnits;
103 var output = new File(y).openWrite(mode: FileMode.WRITE); 103 var output = new File(y).openWrite(mode: FileMode.WRITE);
104 output.writeBytes(data); 104 output.add(data);
105 output.close(); 105 output.close();
106 output.done.then((_) { 106 output.done.then((_) {
107 var read = new File(y).readAsBytesSync(); 107 var read = new File(y).readAsBytesSync();
108 Expect.listEquals(data, read); 108 Expect.listEquals(data, read);
109 var read2 = new File(x).readAsBytesSync(); 109 var read2 = new File(x).readAsBytesSync();
110 Expect.listEquals(data, read2); 110 Expect.listEquals(data, read2);
111 temp.deleteSync(recursive: true); 111 temp.deleteSync(recursive: true);
112 }); 112 });
113 }); 113 });
114 } 114 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 main() { 241 main() {
242 testFileExistsCreate(); 242 testFileExistsCreate();
243 testFileDelete(); 243 testFileDelete();
244 testFileWriteRead(); 244 testFileWriteRead();
245 testDirectoryExistsCreate(); 245 testDirectoryExistsCreate();
246 testDirectoryDelete(); 246 testDirectoryDelete();
247 testDirectoryListing(); 247 testDirectoryListing();
248 testDirectoryListingBrokenLink(); 248 testDirectoryListingBrokenLink();
249 } 249 }
OLDNEW
« no previous file with comments | « tests/standalone/io/file_output_stream_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698