| 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 library fuzz_support; | 5 library fuzz_support; |
| 6 | 6 |
| 7 import 'package:expect/expect.dart'; | |
| 8 import 'dart:async'; | 7 import 'dart:async'; |
| 9 import 'dart:io'; | 8 import 'dart:io'; |
| 10 | 9 |
| 11 const typeMapping = const { | 10 const typeMapping = const { |
| 12 'null': null, | 11 'null': null, |
| 13 'int': 0, | 12 'int': 0, |
| 14 'bigint': 18446744073709551617, | 13 'bigint': 18446744073709551617, |
| 15 'String': 'a', | 14 'String': 'a', |
| 16 'FileMode': FileMode.READ, | 15 'FileMode': FileMode.READ, |
| 17 'num': 0.50, | 16 'num': 0.50, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 47 | 46 |
| 48 // Perform async operation and transform the future for the operation | 47 // Perform async operation and transform the future for the operation |
| 49 // into a future that never fails by treating errors as normal | 48 // into a future that never fails by treating errors as normal |
| 50 // completion. | 49 // completion. |
| 51 Future doItAsync(void f()) { | 50 Future doItAsync(void f()) { |
| 52 // Ignore value and errors. | 51 // Ignore value and errors. |
| 53 return new Future.delayed(Duration.ZERO, f) | 52 return new Future.delayed(Duration.ZERO, f) |
| 54 .catchError((_) {}) | 53 .catchError((_) {}) |
| 55 .then((_) => true); | 54 .then((_) => true); |
| 56 } | 55 } |
| OLD | NEW |