OLD | NEW |
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 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:io"; | 8 import 'dart:async'; |
9 import "dart:isolate"; | 9 import 'dart:io'; |
| 10 import 'dart:isolate'; |
10 | 11 |
11 import "fuzz_support.dart"; | 12 import 'fuzz_support.dart'; |
12 | 13 |
13 fuzzSyncMethods() { | 14 fuzzSyncMethods() { |
14 typeMapping.forEach((k, v) { | 15 typeMapping.forEach((k, v) { |
15 doItSync(() { | 16 doItSync(() { |
16 var f = new File(v); | 17 var f = new File(v); |
17 doItSync(f.existsSync); | 18 doItSync(f.existsSync); |
18 doItSync(f.createSync); | 19 doItSync(f.createSync); |
19 doItSync(f.deleteSync); | 20 doItSync(f.deleteSync); |
20 doItSync(f.directorySync); | 21 doItSync(f.directorySync); |
21 doItSync(f.lengthSync); | 22 doItSync(f.lengthSync); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 temp.deleteSync(recursive: true); | 119 temp.deleteSync(recursive: true); |
119 }); | 120 }); |
120 } | 121 } |
121 | 122 |
122 main() { | 123 main() { |
123 fuzzSyncMethods(); | 124 fuzzSyncMethods(); |
124 fuzzAsyncMethods(); | 125 fuzzAsyncMethods(); |
125 fuzzSyncRandomAccessMethods(); | 126 fuzzSyncRandomAccessMethods(); |
126 fuzzAsyncRandomAccessMethods(); | 127 fuzzAsyncRandomAccessMethods(); |
127 } | 128 } |
OLD | NEW |