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

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

Issue 50413005: Reapply "Remove @deprecated features." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 1 month 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 // 'fuzz' test the file APIs by providing unexpected type arguments. The test 5 // 'fuzz' test the file APIs by providing unexpected type arguments. The test
6 // passes if the VM does not crash. 6 // 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 10
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 fuzzAsyncMethods() { 39 fuzzAsyncMethods() {
40 asyncStart(); 40 asyncStart();
41 var futures = []; 41 var futures = [];
42 typeMapping.forEach((k, v) { 42 typeMapping.forEach((k, v) {
43 doItSync(() { 43 doItSync(() {
44 var f = new File(v); 44 var f = new File(v);
45 futures.add(doItAsync(f.exists)); 45 futures.add(doItAsync(f.exists));
46 futures.add(doItAsync(f.delete)); 46 futures.add(doItAsync(f.delete));
47 futures.add(doItAsync(f.directory)); 47 futures.add(doItAsync(f.parent));
48 futures.add(doItAsync(f.length)); 48 futures.add(doItAsync(f.length));
49 futures.add(doItAsync(f.modified)); 49 futures.add(doItAsync(f.modified));
50 futures.add(doItAsync(f.open)); 50 futures.add(doItAsync(f.open));
51 futures.add(doItAsync(f.fullPath)); 51 futures.add(doItAsync(f.fullPath));
52 futures.add(doItAsync(f.readAsBytes)); 52 futures.add(doItAsync(f.readAsBytes));
53 futures.add(doItAsync(f.readAsLines)); 53 futures.add(doItAsync(f.readAsLines));
54 futures.add(doItAsync(f.readAsString)); 54 futures.add(doItAsync(f.readAsString));
55 typeMapping.forEach((k2, v2) { 55 typeMapping.forEach((k2, v2) {
56 futures.add(doItAsync(() => f.open(mode: v2))); 56 futures.add(doItAsync(() => f.open(mode: v2)));
57 futures.add(doItAsync(() => f.readAsString(encoding: v2))); 57 futures.add(doItAsync(() => f.readAsString(encoding: v2)));
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 temp.deleteSync(recursive: true); 117 temp.deleteSync(recursive: true);
118 }); 118 });
119 } 119 }
120 120
121 main() { 121 main() {
122 fuzzSyncMethods(); 122 fuzzSyncMethods();
123 fuzzAsyncMethods(); 123 fuzzAsyncMethods();
124 fuzzSyncRandomAccessMethods(); 124 fuzzSyncRandomAccessMethods();
125 fuzzAsyncRandomAccessMethods(); 125 fuzzAsyncRandomAccessMethods();
126 } 126 }
OLDNEW
« no previous file with comments | « tests/standalone/io/directory_test.dart ('k') | tests/standalone/io/file_non_ascii_sync_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698