| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 }; | 407 }; |
| 408 | 408 |
| 409 /// These members are only needed when async/await is used. | 409 /// These members are only needed when async/await is used. |
| 410 const Map<String, String> ASYNC_AWAIT_LIBRARY = const <String, String>{ | 410 const Map<String, String> ASYNC_AWAIT_LIBRARY = const <String, String>{ |
| 411 '_wrapJsFunctionForAsync': '_wrapJsFunctionForAsync(f) {}', | 411 '_wrapJsFunctionForAsync': '_wrapJsFunctionForAsync(f) {}', |
| 412 '_asyncHelper': '_asyncHelper(o, f, c) {}', | 412 '_asyncHelper': '_asyncHelper(o, f, c) {}', |
| 413 '_SyncStarIterable': 'class _SyncStarIterable {}', |
| 414 '_IterationMarker': 'class _IterationMarker {}', |
| 415 '_AsyncStarStreamController': 'class _AsyncStarStreamController {}', |
| 416 '_asyncStarHelper': '_asyncStarHelper(x, y, z) {}', |
| 417 '_streamOfController': '_streamOfController(x) {}', |
| 413 }; | 418 }; |
| 414 | 419 |
| 415 const String DEFAULT_MIRRORS_SOURCE = r''' | 420 const String DEFAULT_MIRRORS_SOURCE = r''' |
| 416 import 'dart:_js_mirrors' as js; | 421 import 'dart:_js_mirrors' as js; |
| 417 class Comment {} | 422 class Comment {} |
| 418 class MirrorSystem {} | 423 class MirrorSystem {} |
| 419 class MirrorsUsed { | 424 class MirrorsUsed { |
| 420 final targets; | 425 final targets; |
| 421 const MirrorsUsed({this.targets}); | 426 const MirrorsUsed({this.targets}); |
| 422 } | 427 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 440 | 445 |
| 441 const LookupMap(this._entries, [this._nestedMaps = const []]) | 446 const LookupMap(this._entries, [this._nestedMaps = const []]) |
| 442 : _key = null, _value = null; | 447 : _key = null, _value = null; |
| 443 | 448 |
| 444 const LookupMap.pair(this._key, this._value) | 449 const LookupMap.pair(this._key, this._value) |
| 445 : _entries = const [], _nestedMaps = const []; | 450 : _entries = const [], _nestedMaps = const []; |
| 446 V operator[](K k) => null; | 451 V operator[](K k) => null; |
| 447 }''', | 452 }''', |
| 448 '_version': 'const _version = "0.0.1+1";', | 453 '_version': 'const _version = "0.0.1+1";', |
| 449 }; | 454 }; |
| OLD | NEW |