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

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

Issue 25471003: Modify tests to use Directory.systemTemp (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 7 years, 2 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/windows_file_system_async_links_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 "dart:io"; 6 import "dart:io";
7 import "dart:isolate"; 7 import "dart:isolate";
8 8
9 testJunctionTypeDelete() { 9 testJunctionTypeDelete() {
10 var temp = new Directory('').createTempSync(); 10 var temp =
11 Directory.systemTemp.createTempSync('dart_windows_file_system_links');
11 var x = '${temp.path}${Platform.pathSeparator}x'; 12 var x = '${temp.path}${Platform.pathSeparator}x';
12 var y = '${temp.path}${Platform.pathSeparator}y'; 13 var y = '${temp.path}${Platform.pathSeparator}y';
13 14
14 new Directory(x).createSync(); 15 new Directory(x).createSync();
15 new Link(y).create(x).then((_) { 16 new Link(y).create(x).then((_) {
16 Expect.isTrue(new Directory(y).existsSync()); 17 Expect.isTrue(new Directory(y).existsSync());
17 Expect.isTrue(new Directory(x).existsSync()); 18 Expect.isTrue(new Directory(x).existsSync());
18 Expect.isTrue(FileSystemEntity.isLinkSync(y)); 19 Expect.isTrue(FileSystemEntity.isLinkSync(y));
19 Expect.isFalse(FileSystemEntity.isLinkSync(x)); 20 Expect.isFalse(FileSystemEntity.isLinkSync(x));
20 Expect.isTrue(FileSystemEntity.isDirectorySync(y)); 21 Expect.isTrue(FileSystemEntity.isDirectorySync(y));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 }); 80 });
80 } 81 }
81 82
82 83
83 main() { 84 main() {
84 // Links on other platforms are tested by file_system_[async_]links_test. 85 // Links on other platforms are tested by file_system_[async_]links_test.
85 if (Platform.operatingSystem == 'windows') { 86 if (Platform.operatingSystem == 'windows') {
86 testJunctionTypeDelete(); 87 testJunctionTypeDelete();
87 } 88 }
88 } 89 }
OLDNEW
« no previous file with comments | « tests/standalone/io/windows_file_system_async_links_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698