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

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

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head 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 | « tests/standalone/io/file_input_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) 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 import "dart:io"; 5 import "dart:io";
6 import "dart:isolate"; 6 import "dart:isolate";
7 7
8 8
9 createLink(String dst, String link, bool symbolic, void callback()) { 9 createLink(String dst, String link, bool symbolic, void callback()) {
10 var args = [ symbolic ? '-s' : '', dst, link ]; 10 var args = [ symbolic ? '-s' : '', dst, link ];
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 }); 59 });
60 } 60 }
61 61
62 62
63 testFileWriteRead() { 63 testFileWriteRead() {
64 var temp = new Directory('').createTempSync(); 64 var temp = new Directory('').createTempSync();
65 var x = '${temp.path}${Platform.pathSeparator}x'; 65 var x = '${temp.path}${Platform.pathSeparator}x';
66 var y = '${temp.path}${Platform.pathSeparator}y'; 66 var y = '${temp.path}${Platform.pathSeparator}y';
67 new File(x).createSync(); 67 new File(x).createSync();
68 createLink(x, y, true, () { 68 createLink(x, y, true, () {
69 var data = "asdf".charCodes; 69 var data = "asdf".codeUnits;
70 var output = new File(y).openWrite(FileMode.WRITE); 70 var output = new File(y).openWrite(FileMode.WRITE);
71 output.add(data); 71 output.add(data);
72 output.close(); 72 output.close();
73 output.done.then((_) { 73 output.done.then((_) {
74 var read = new File(y).readAsBytesSync(); 74 var read = new File(y).readAsBytesSync();
75 Expect.listEquals(data, read); 75 Expect.listEquals(data, read);
76 var read2 = new File(x).readAsBytesSync(); 76 var read2 = new File(x).readAsBytesSync();
77 Expect.listEquals(data, read2); 77 Expect.listEquals(data, read2);
78 temp.deleteSync(recursive: true); 78 temp.deleteSync(recursive: true);
79 }); 79 });
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 main() { 205 main() {
206 testFileExistsCreate(); 206 testFileExistsCreate();
207 testFileDelete(); 207 testFileDelete();
208 testFileWriteRead(); 208 testFileWriteRead();
209 testDirectoryExistsCreate(); 209 testDirectoryExistsCreate();
210 testDirectoryDelete(); 210 testDirectoryDelete();
211 testDirectoryListing(); 211 testDirectoryListing();
212 testDirectoryListingBrokenLink(); 212 testDirectoryListingBrokenLink();
213 } 213 }
OLDNEW
« no previous file with comments | « tests/standalone/io/file_input_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