| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 const Map<String, String> ASYNC_AWAIT_LIBRARY = const <String, String>{ | 390 const Map<String, String> ASYNC_AWAIT_LIBRARY = const <String, String>{ |
| 391 '_wrapJsFunctionForAsync': '_wrapJsFunctionForAsync(f) {}', | 391 '_wrapJsFunctionForAsync': '_wrapJsFunctionForAsync(f) {}', |
| 392 '_asyncHelper': '_asyncHelper(o, f, c) {}', | 392 '_asyncHelper': '_asyncHelper(o, f, c) {}', |
| 393 }; | 393 }; |
| 394 | 394 |
| 395 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ | 395 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ |
| 396 'Comment': 'class Comment {}', | 396 'Comment': 'class Comment {}', |
| 397 'MirrorSystem': 'class MirrorSystem {}', | 397 'MirrorSystem': 'class MirrorSystem {}', |
| 398 'MirrorsUsed': 'class MirrorsUsed {}', | 398 'MirrorsUsed': 'class MirrorsUsed {}', |
| 399 }; | 399 }; |
| 400 |
| 401 const Map<String, String> DEFAULT_LOOKUP_MAP_LIBRARY = const <String, String>{ |
| 402 'LookupMap': r''' |
| 403 class LookupMap<T> { |
| 404 final _key; |
| 405 final _value; |
| 406 final _entries; |
| 407 final _nestedMaps; |
| 408 |
| 409 const LookupMap(this._entries, [this._nestedMaps = const []]) |
| 410 : _key = null, _value = null; |
| 411 |
| 412 const LookupMap.pair(this._key, this._value) |
| 413 : _entries = const [], _nestedMaps = const []; |
| 414 }''', |
| 415 }; |
| OLD | NEW |