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

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

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 years, 8 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/directory_fuzz_test.dart ('k') | tests/standalone/io/http_auth_test.dart » ('j') | 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:async"; 6 import "dart:async";
7 import "dart:io"; 7 import "dart:io";
8 8
9 Future throws(callback()) { 9 Future throws(callback()) {
10 return new Future.immediate(null) 10 return new Future.value()
11 .then((_) => callback()) 11 .then((_) => callback())
12 .then((_) { throw "Expected error"; }, 12 .then((_) { throw "Expected error"; },
13 onError: (_) {}); 13 onError: (_) {});
14 } 14 }
15 15
16 void testDeleteFileSync() { 16 void testDeleteFileSync() {
17 var tmp = new Directory("").createTempSync(); 17 var tmp = new Directory("").createTempSync();
18 var path = "${tmp.path}${Platform.pathSeparator}"; 18 var path = "${tmp.path}${Platform.pathSeparator}";
19 19
20 var file = new File("${path}myFile"); 20 var file = new File("${path}myFile");
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 testDeleteDirectory(); 398 testDeleteDirectory();
399 if (Platform.operatingSystem != 'windows') { 399 if (Platform.operatingSystem != 'windows') {
400 testDeleteFileLinkSync(); 400 testDeleteFileLinkSync();
401 testDeleteFileLink(); 401 testDeleteFileLink();
402 } 402 }
403 testDeleteDirectoryLinkSync(); 403 testDeleteDirectoryLinkSync();
404 testDeleteDirectoryLink(); 404 testDeleteDirectoryLink();
405 testDeleteBrokenLinkSync(); 405 testDeleteBrokenLinkSync();
406 testDeleteBrokenLink(); 406 testDeleteBrokenLink();
407 } 407 }
OLDNEW
« no previous file with comments | « tests/standalone/io/directory_fuzz_test.dart ('k') | tests/standalone/io/http_auth_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698