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

Unified Diff: tests/standalone/io/file_system_delete_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 side-by-side diff with in-line comments
Download patch
Index: tests/standalone/io/file_system_delete_test.dart
diff --git a/tests/standalone/io/file_system_delete_test.dart b/tests/standalone/io/file_system_delete_test.dart
index cf1d80165afe9dfe0bf28137742e079e836d84cc..c6ff7d3eeabbe4ec521b779ffc8d043d659c36fb 100644
--- a/tests/standalone/io/file_system_delete_test.dart
+++ b/tests/standalone/io/file_system_delete_test.dart
@@ -14,7 +14,7 @@ Future throws(callback()) {
}
void testDeleteFileSync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.systemTemp.createTempSync('dart_file_system_delete');
var path = "${tmp.path}${Platform.pathSeparator}";
var file = new File("${path}myFile");
@@ -48,7 +48,7 @@ void testDeleteFileSync() {
}
void testDeleteFile() {
- new Directory("").createTemp().then((tmp) {
+ Directory.systemTemp.createTemp('dart_file_system_delete').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var file = new File("${path}myFile");
return file.create()
@@ -78,7 +78,7 @@ void testDeleteFile() {
}
void testDeleteDirectorySync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.systemTemp.createTempSync('dart_file_system_delete');
var path = "${tmp.path}${Platform.pathSeparator}";
var dir = new Directory("${path}myDirectory");
@@ -112,7 +112,7 @@ void testDeleteDirectorySync() {
}
void testDeleteDirectory() {
- new Directory("").createTemp().then((tmp) {
+ Directory.systemTemp.createTemp('dart_file_system_delete').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var dir = new Directory("${path}myDirectory");
return dir.create()
@@ -142,7 +142,7 @@ void testDeleteDirectory() {
}
void testDeleteFileLinkSync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.systemTemp.createTempSync('dart_file_system_delete');
var path = "${tmp.path}${Platform.pathSeparator}";
var file = new File("${path}myFile");
@@ -185,7 +185,7 @@ void testDeleteFileLinkSync() {
}
void testDeleteFileLink() {
- new Directory("").createTemp().then((tmp) {
+ Directory.systemTemp.createTemp('dart_file_system_delete').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var file = new File("${path}myFile");
var link = new Link("${path}myLink");
@@ -226,7 +226,7 @@ void testDeleteFileLink() {
}
void testDeleteDirectoryLinkSync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.systemTemp.createTempSync('dart_file_system_delete');
var path = "${tmp.path}${Platform.pathSeparator}";
var directory = new Directory("${path}myDirectory");
@@ -269,7 +269,7 @@ void testDeleteDirectoryLinkSync() {
}
void testDeleteDirectoryLink() {
- new Directory("").createTemp().then((tmp) {
+ Directory.systemTemp.createTemp('dart_file_system_delete').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var dir = new Directory("${path}myDir");
var link = new Link("${path}myLink");
@@ -310,7 +310,7 @@ void testDeleteDirectoryLink() {
}
void testDeleteBrokenLinkSync() {
- var tmp = new Directory("").createTempSync();
+ var tmp = Directory.systemTemp.createTempSync('dart_file_system_delete');
var path = "${tmp.path}${Platform.pathSeparator}";
var directory = new Directory("${path}myDirectory");
@@ -352,7 +352,7 @@ void testDeleteBrokenLinkSync() {
}
void testDeleteBrokenLink() {
- new Directory("").createTemp().then((tmp) {
+ Directory.systemTemp.createTemp('dart_file_system_delete').then((tmp) {
var path = "${tmp.path}${Platform.pathSeparator}";
var dir = new Directory("${path}myDir");
var link = new Link("${path}myLink");
« no previous file with comments | « tests/standalone/io/file_system_async_links_test.dart ('k') | tests/standalone/io/file_system_exists_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698