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