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

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

Issue 11263040: Make String.charCodes a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 1 month 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 6
7 7
8 createLink(String dst, String link, bool symbolic, void callback()) { 8 createLink(String dst, String link, bool symbolic, void callback()) {
9 var args = [ symbolic ? '-s' : '', dst, link ]; 9 var args = [ symbolic ? '-s' : '', dst, link ];
10 var script = 'tests/standalone/io/ln.sh'; 10 var script = 'tests/standalone/io/ln.sh';
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 }); 58 });
59 } 59 }
60 60
61 61
62 testFileWriteRead() { 62 testFileWriteRead() {
63 var temp = new Directory('').createTempSync(); 63 var temp = new Directory('').createTempSync();
64 var x = '${temp.path}${Platform.pathSeparator}x'; 64 var x = '${temp.path}${Platform.pathSeparator}x';
65 var y = '${temp.path}${Platform.pathSeparator}y'; 65 var y = '${temp.path}${Platform.pathSeparator}y';
66 new File(x).createSync(); 66 new File(x).createSync();
67 createLink(x, y, true, () { 67 createLink(x, y, true, () {
68 var data = "asdf".charCodes(); 68 var data = "asdf".charCodes;
69 var output = new File(y).openOutputStream(FileMode.WRITE); 69 var output = new File(y).openOutputStream(FileMode.WRITE);
70 output.write(data); 70 output.write(data);
71 output.onNoPendingWrites = () { 71 output.onNoPendingWrites = () {
72 output.close(); 72 output.close();
73 var read = new File(y).readAsBytesSync(); 73 var read = new File(y).readAsBytesSync();
74 Expect.listEquals(data, read); 74 Expect.listEquals(data, read);
75 var read2 = new File(x).readAsBytesSync(); 75 var read2 = new File(x).readAsBytesSync();
76 Expect.listEquals(data, read2); 76 Expect.listEquals(data, read2);
77 temp.deleteRecursivelySync(); 77 temp.deleteRecursivelySync();
78 }; 78 };
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 main() { 173 main() {
174 testFileExistsCreate(); 174 testFileExistsCreate();
175 testFileDelete(); 175 testFileDelete();
176 testFileWriteRead(); 176 testFileWriteRead();
177 testDirectoryExistsCreate(); 177 testDirectoryExistsCreate();
178 testDirectoryDelete(); 178 testDirectoryDelete();
179 testDirectoryListing(); 179 testDirectoryListing();
180 testDirectoryListingBrokenLink(); 180 testDirectoryListingBrokenLink();
181 } 181 }
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