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

Unified Diff: tests/standalone/io/file_system_exists_test.dart

Issue 25471003: Modify tests to use Directory.systemTemp (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: tests/standalone/io/file_system_exists_test.dart
diff --git a/tests/standalone/io/file_system_exists_test.dart b/tests/standalone/io/file_system_exists_test.dart
index a87bdd17fcd7fb1340a2b30654308c9afa5defee..27898b5d1dc9c102555a405f78f692b502383a51 100644
--- a/tests/standalone/io/file_system_exists_test.dart
+++ b/tests/standalone/io/file_system_exists_test.dart
@@ -6,7 +6,7 @@ import "package:expect/expect.dart";
import "dart:io";
void testFileExistsSync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.createSystemTempSync('dart_file_system_exists');
var path = "${tmp.path}${Platform.pathSeparator}";
var file = new File("${path}myFile");
@@ -23,7 +23,7 @@ void testFileExistsSync() {
}
void testFileExists() {
- new Directory("").createTemp().then((tmp) {
+ Directory.createSystemTemp('dart_file_system_exists').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var file = new File("${path}myFile");
return file.create()
@@ -37,7 +37,7 @@ void testFileExists() {
}
void testDirectoryExistsSync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.createSystemTempSync('dart_file_system_exists');
var path = "${tmp.path}${Platform.pathSeparator}";
var dir = new Directory("${path}myDirectory");
@@ -54,7 +54,7 @@ void testDirectoryExistsSync() {
}
void testDirectoryExists() {
- new Directory("").createTemp().then((tmp) {
+ Directory.createSystemTemp('dart_file_system_exists').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var dir = new Directory("${path}myDirectory");
return dir.create()
@@ -68,7 +68,7 @@ void testDirectoryExists() {
}
void testFileLinkExistsSync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.createSystemTempSync('dart_file_system_exists');
var path = "${tmp.path}${Platform.pathSeparator}";
var file = new File("${path}myFile");
@@ -91,7 +91,7 @@ void testFileLinkExistsSync() {
}
void testFileLinkExists() {
- new Directory("").createTemp().then((tmp) {
+ Directory.createSystemTemp('dart_file_system_exists').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var file = new File("${path}myFile");
var link = new Link("${path}myLink");
@@ -109,7 +109,7 @@ void testFileLinkExists() {
}
void testDirectoryLinkExistsSync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.createSystemTempSync('dart_file_system_exists');
var path = "${tmp.path}${Platform.pathSeparator}";
var directory = new Directory("${path}myDirectory");
@@ -132,7 +132,7 @@ void testDirectoryLinkExistsSync() {
}
void testDirectoryLinkExists() {
- new Directory("").createTemp().then((tmp) {
+ Directory.createSystemTemp('dart_file_system_exists').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var dir = new Directory("${path}myDir");
var link = new Link("${path}myLink");
@@ -150,7 +150,7 @@ void testDirectoryLinkExists() {
}
void testBrokenLinkExistsSync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.createSystemTempSync('dart_file_system_exists');
var path = "${tmp.path}${Platform.pathSeparator}";
var directory = new Directory("${path}myDirectory");
@@ -171,7 +171,7 @@ void testBrokenLinkExistsSync() {
}
void testBrokenLinkExists() {
- new Directory("").createTemp().then((tmp) {
+ Directory.createSystemTemp('dart_file_system_exists').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var dir = new Directory("${path}myDir");
var link = new Link("${path}myLink");

Powered by Google App Engine
This is Rietveld 408576698