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

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

Issue 11865005: Remove Futures class, move methods to Future. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // 'fuzz' test the directory APIs by providing unexpected type 5 // 'fuzz' test the directory APIs by providing unexpected type
6 // arguments. The test passes if the VM does not crash. 6 // arguments. The test passes if the VM does not crash.
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:isolate'; 10 import 'dart:isolate';
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 futures.add(doItAsync(() { 52 futures.add(doItAsync(() {
53 return d.exists().then((res) { 53 return d.exists().then((res) {
54 if (!res) return d.delete(recursive: true); 54 if (!res) return d.delete(recursive: true);
55 return new Future.immediate(true); 55 return new Future.immediate(true);
56 }); 56 });
57 })); 57 }));
58 typeMapping.forEach((k2, v2) { 58 typeMapping.forEach((k2, v2) {
59 futures.add(doItAsync(() => d.rename(v2))); 59 futures.add(doItAsync(() => d.rename(v2)));
60 }); 60 });
61 }); 61 });
62 Futures.wait(futures).then((ignore) => port.close()); 62 Future.wait(futures).then((ignore) => port.close());
63 } 63 }
64 64
65 main() { 65 main() {
66 fuzzSyncMethods(); 66 fuzzSyncMethods();
67 fuzzAsyncMethods(); 67 fuzzAsyncMethods();
68 } 68 }
OLDNEW
« no previous file with comments | « tests/standalone/io/directory_create_race_test.dart ('k') | tests/standalone/io/file_fuzz_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698