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

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

Issue 26968003: Remove DirectoryException and LinkException from dart:io and use FileException instaed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge with master. Created 7 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_test.dart ('k') | no next file » | 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 "package:path/path.dart"; 6 import "package:path/path.dart";
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 testRename(base, file.path); 197 testRename(base, file.path);
198 testRename(base, dir.path); 198 testRename(base, dir.path);
199 199
200 baseDir.deleteSync(recursive: true); 200 baseDir.deleteSync(recursive: true);
201 } 201 }
202 202
203 void testLinkErrorSync() { 203 void testLinkErrorSync() {
204 Expect.throws(() => 204 Expect.throws(() =>
205 new Link('some-dir-that-doent exist/some link file/bla/fisk').createSync( 205 new Link('some-dir-that-doent exist/some link file/bla/fisk').createSync(
206 'bla bla bla/b lalal/blfir/sdfred/es'), 206 'bla bla bla/b lalal/blfir/sdfred/es'),
207 (e) => e is LinkException); 207 (e) => e is FileSystemException);
208 } 208 }
209 209
210 checkExists(String filePath) => Expect.isTrue(new File(filePath).existsSync()); 210 checkExists(String filePath) => Expect.isTrue(new File(filePath).existsSync());
211 211
212 testRelativeLinksSync() { 212 testRelativeLinksSync() {
213 Directory tempDirectory = Directory.systemTemp.createTempSync('dart_link'); 213 Directory tempDirectory = Directory.systemTemp.createTempSync('dart_link');
214 String temp = tempDirectory.path; 214 String temp = tempDirectory.path;
215 String oldWorkingDirectory = Directory.current.path; 215 String oldWorkingDirectory = Directory.current.path;
216 // Make directories and files to test links. 216 // Make directories and files to test links.
217 new Directory(join(temp, 'dir1', 'dir2')).createSync(recursive: true); 217 new Directory(join(temp, 'dir1', 'dir2')).createSync(recursive: true);
(...skipping 20 matching lines...) Expand all
238 tempDirectory.deleteSync(recursive: true); 238 tempDirectory.deleteSync(recursive: true);
239 } 239 }
240 240
241 main() { 241 main() {
242 testCreateSync(); 242 testCreateSync();
243 testCreateLoopingLink(); 243 testCreateLoopingLink();
244 testRenameSync(); 244 testRenameSync();
245 testLinkErrorSync(); 245 testLinkErrorSync();
246 testRelativeLinksSync(); 246 testRelativeLinksSync();
247 } 247 }
OLDNEW
« no previous file with comments | « tests/standalone/io/file_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698