| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 'DeferredLibrary': 'class DeferredLibrary {}', | 397 'DeferredLibrary': 'class DeferredLibrary {}', |
| 398 'Future': | 398 'Future': |
| 399 ''' | 399 ''' |
| 400 class Future<T> { | 400 class Future<T> { |
| 401 Future.value([value]); | 401 Future.value([value]); |
| 402 } | 402 } |
| 403 ''', | 403 ''', |
| 404 'Stream': 'class Stream<T> {}', | 404 'Stream': 'class Stream<T> {}', |
| 405 'Completer': 'class Completer<T> {}', | 405 'Completer': 'class Completer<T> {}', |
| 406 'StreamIterator': 'class StreamIterator<T> {}', | 406 'StreamIterator': 'class StreamIterator<T> {}', |
| 407 '_SyncStarIterable': 'class _SyncStarIterable {}', | |
| 408 '_IterationMarker': 'class _IterationMarker {}', | |
| 409 '_AsyncStarStreamController': 'class _AsyncStarStreamController {}', | |
| 410 }; | 407 }; |
| 411 | 408 |
| 412 /// These members are only needed when async/await is used. | 409 /// These members are only needed when async/await is used. |
| 413 const Map<String, String> ASYNC_AWAIT_LIBRARY = const <String, String>{ | 410 const Map<String, String> ASYNC_AWAIT_LIBRARY = const <String, String>{ |
| 414 '_wrapJsFunctionForAsync': '_wrapJsFunctionForAsync(f) {}', | 411 '_wrapJsFunctionForAsync': '_wrapJsFunctionForAsync(f) {}', |
| 415 '_asyncHelper': '_asyncHelper(o, f, c) {}', | 412 '_asyncHelper': '_asyncHelper(o, f, c) {}', |
| 416 }; | 413 }; |
| 417 | 414 |
| 418 const String DEFAULT_MIRRORS_SOURCE = r''' | 415 const String DEFAULT_MIRRORS_SOURCE = r''' |
| 419 import 'dart:_js_mirrors' as js; | 416 import 'dart:_js_mirrors' as js; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 443 | 440 |
| 444 const LookupMap(this._entries, [this._nestedMaps = const []]) | 441 const LookupMap(this._entries, [this._nestedMaps = const []]) |
| 445 : _key = null, _value = null; | 442 : _key = null, _value = null; |
| 446 | 443 |
| 447 const LookupMap.pair(this._key, this._value) | 444 const LookupMap.pair(this._key, this._value) |
| 448 : _entries = const [], _nestedMaps = const []; | 445 : _entries = const [], _nestedMaps = const []; |
| 449 V operator[](K k) => null; | 446 V operator[](K k) => null; |
| 450 }''', | 447 }''', |
| 451 '_version': 'const _version = "0.0.1+1";', | 448 '_version': 'const _version = "0.0.1+1";', |
| 452 }; | 449 }; |
| OLD | NEW |