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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 library fuzz_support; 5 library fuzz_support;
6 6
7 import 'package:expect/expect.dart';
7 import 'dart:async'; 8 import 'dart:async';
8 import 'dart:io'; 9 import 'dart:io';
9 10
10 const typeMapping = const { 11 const typeMapping = const {
11 'null': null, 12 'null': null,
12 'int': 0, 13 'int': 0,
13 'bigint': 18446744073709551617, 14 'bigint': 18446744073709551617,
14 'String': 'a', 15 'String': 'a',
15 'FileMode': FileMode.READ, 16 'FileMode': FileMode.READ,
16 'num': 0.50, 17 'num': 0.50,
(...skipping 27 matching lines...) Expand all
44 try { f(); } catch (e) {} 45 try { f(); } catch (e) {}
45 } 46 }
46 47
47 // Perform async operation and transform the future for the operation 48 // Perform async operation and transform the future for the operation
48 // into a future that never fails by treating errors as normal 49 // into a future that never fails by treating errors as normal
49 // completion. 50 // completion.
50 Future doItAsync(void f()) { 51 Future doItAsync(void f()) {
51 // Ignore value and errors. 52 // Ignore value and errors.
52 return new Future.delayed(0, f).catchError((_) {}).then((_) => true); 53 return new Future.delayed(0, f).catchError((_) {}).then((_) => true);
53 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698