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

Unified Diff: tests/standalone/io/directory_fuzz_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/directory_fuzz_test.dart
diff --git a/tests/standalone/io/directory_fuzz_test.dart b/tests/standalone/io/directory_fuzz_test.dart
index 761bdef4c7ad0327b7f9d44f44d832fbfca062f4..6e9705753ae8843bbdb5ea4de1253466916d9b50 100644
--- a/tests/standalone/io/directory_fuzz_test.dart
+++ b/tests/standalone/io/directory_fuzz_test.dart
@@ -16,13 +16,16 @@ import 'fuzz_support.dart';
fuzzSyncMethods() {
typeMapping.forEach((k, v) {
doItSync(() {
+ doItSync(() {
+ Directory.systemTemp.createTempSync(v).deleteSync();
+ });
var d = new Directory(v);
doItSync(d.existsSync);
doItSync(d.createSync);
doItSync(d.deleteSync);
doItSync(d.listSync);
doItSync(() {
- d.createTempSync().deleteSync();
+ d.createTempSync('tempdir').deleteSync();
});
doItSync(() {
// Let's be a little careful. If the directory exists we don't
@@ -41,6 +44,9 @@ fuzzAsyncMethods() {
asyncStart();
var futures = [];
typeMapping.forEach((k, v) {
+ futures.add(doItAsync(() {
+ Directory.systemTemp.createTempSync(v).deleteSync();
+ }));
if (v is! String) {
Expect.throws(() => new Directory(v),
(e) => e is ArgumentError);
@@ -51,7 +57,7 @@ fuzzAsyncMethods() {
futures.add(doItAsync(d.create));
futures.add(doItAsync(d.delete));
futures.add(doItAsync(() {
- return d.createTemp().then((temp) {
+ return d.createTemp('tempdir').then((temp) {
return temp.delete();
});
}));
« no previous file with comments | « tests/standalone/io/directory_error_test.dart ('k') | tests/standalone/io/directory_list_nonexistent_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698