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

Side by Side Diff: tests/standalone/io/file_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
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 // Dart test program for testing file I/O. 5 // Dart test program for testing file I/O.
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:collection'; 9 import 'dart:collection';
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 static void asyncTestDone(String name) { 40 static void asyncTestDone(String name) {
41 asyncEnd(); 41 asyncEnd();
42 --numLiveAsyncTests; 42 --numLiveAsyncTests;
43 if (numLiveAsyncTests == 0) { 43 if (numLiveAsyncTests == 0) {
44 deleteTempDirectory(); 44 deleteTempDirectory();
45 } 45 }
46 } 46 }
47 47
48 static void createTempDirectory(Function doNext) { 48 static void createTempDirectory(Function doNext) {
49 new Directory('').createTemp().then((temp) { 49 Directory.systemTemp.createTemp('dart_file').then((temp) {
50 tempDirectory = temp; 50 tempDirectory = temp;
51 doNext(); 51 doNext();
52 }); 52 });
53 } 53 }
54 54
55 static void deleteTempDirectory() { 55 static void deleteTempDirectory() {
56 tempDirectory.deleteSync(recursive: true); 56 tempDirectory.deleteSync(recursive: true);
57 } 57 }
58 58
59 // Test for file read functionality. 59 // Test for file read functionality.
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 testLastModified(); 1325 testLastModified();
1326 testDoubleAsyncOperation(); 1326 testDoubleAsyncOperation();
1327 asyncEnd(); 1327 asyncEnd();
1328 }); 1328 });
1329 } 1329 }
1330 } 1330 }
1331 1331
1332 main() { 1332 main() {
1333 FileTest.testMain(); 1333 FileTest.testMain();
1334 } 1334 }
OLDNEW
« no previous file with comments | « tests/standalone/io/file_system_watcher_test.dart ('k') | tests/standalone/io/file_typed_data_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698