| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 for creating mock versions of platform and internal libraries. | 5 // Library for creating mock versions of platform and internal libraries. |
| 6 | 6 |
| 7 library mock_libraries; | 7 library mock_libraries; |
| 8 | 8 |
| 9 String buildLibrarySource( | 9 String buildLibrarySource( |
| 10 Map<String, String> elementMap, | 10 Map<String, String> elementMap, |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 const Map<String, String> DEFAULT_ISOLATE_HELPER_LIBRARY = | 358 const Map<String, String> DEFAULT_ISOLATE_HELPER_LIBRARY = |
| 359 const <String, String>{ | 359 const <String, String>{ |
| 360 'startRootIsolate': 'void startRootIsolate(entry, args) {}', | 360 'startRootIsolate': 'void startRootIsolate(entry, args) {}', |
| 361 '_currentIsolate': 'var _currentIsolate;', | 361 '_currentIsolate': 'var _currentIsolate;', |
| 362 '_callInIsolate': 'var _callInIsolate;', | 362 '_callInIsolate': 'var _callInIsolate;', |
| 363 '_WorkerBase': 'class _WorkerBase {}', | 363 '_WorkerBase': 'class _WorkerBase {}', |
| 364 }; | 364 }; |
| 365 | 365 |
| 366 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{ | 366 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{ |
| 367 'DeferredLibrary': 'class DeferredLibrary {}', | 367 'DeferredLibrary': 'class DeferredLibrary {}', |
| 368 'Future': 'class Future<T> {}', | 368 'Future': |
| 369 ''' |
| 370 class Future<T> { |
| 371 Future.value([value]); |
| 372 } |
| 373 ''', |
| 369 'Stream': 'class Stream<T> {}', | 374 'Stream': 'class Stream<T> {}', |
| 370 'Completer': 'class Completer<T> {}', | 375 'Completer': 'class Completer<T> {}', |
| 371 'StreamIterator': 'class StreamIterator<T> {}', | 376 'StreamIterator': 'class StreamIterator<T> {}', |
| 372 }; | 377 }; |
| 373 | 378 |
| 374 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ | 379 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ |
| 375 'Comment': 'class Comment {}', | 380 'Comment': 'class Comment {}', |
| 376 'MirrorSystem': 'class MirrorSystem {}', | 381 'MirrorSystem': 'class MirrorSystem {}', |
| 377 'MirrorsUsed': 'class MirrorsUsed {}', | 382 'MirrorsUsed': 'class MirrorsUsed {}', |
| 378 }; | 383 }; |
| OLD | NEW |