| 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 const DEFAULT_PLATFORM_CONFIG = """ |
| 10 [libraries] |
| 11 core:core/core.dart |
| 12 async:async/async.dart |
| 13 _js_helper:_internal/js_runtime/lib/js_helper.dart |
| 14 _interceptors:_internal/js_runtime/lib/interceptors.dart |
| 15 _isolate_helper:_internal/js_runtime/lib/isolate_helper.dart |
| 16 """; |
| 17 |
| 9 String buildLibrarySource( | 18 String buildLibrarySource( |
| 10 Map<String, String> elementMap, | 19 Map<String, String> elementMap, |
| 11 [Map<String, String> additionalElementMap = const <String, String>{}]) { | 20 [Map<String, String> additionalElementMap = const <String, String>{}]) { |
| 12 Map<String, String> map = new Map<String, String>.from(elementMap); | 21 Map<String, String> map = new Map<String, String>.from(elementMap); |
| 13 if (additionalElementMap != null) { | 22 if (additionalElementMap != null) { |
| 14 map.addAll(additionalElementMap); | 23 map.addAll(additionalElementMap); |
| 15 } | 24 } |
| 16 StringBuffer sb = new StringBuffer(); | 25 StringBuffer sb = new StringBuffer(); |
| 17 map.values.forEach((String element) { | 26 map.values.forEach((String element) { |
| 18 sb.write('$element\n'); | 27 sb.write('$element\n'); |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 456 |
| 448 const LookupMap(this._entries, [this._nestedMaps = const []]) | 457 const LookupMap(this._entries, [this._nestedMaps = const []]) |
| 449 : _key = null, _value = null; | 458 : _key = null, _value = null; |
| 450 | 459 |
| 451 const LookupMap.pair(this._key, this._value) | 460 const LookupMap.pair(this._key, this._value) |
| 452 : _entries = const [], _nestedMaps = const []; | 461 : _entries = const [], _nestedMaps = const []; |
| 453 V operator[](K k) => null; | 462 V operator[](K k) => null; |
| 454 }''', | 463 }''', |
| 455 '_version': 'const _version = "0.0.1+1";', | 464 '_version': 'const _version = "0.0.1+1";', |
| 456 }; | 465 }; |
| OLD | NEW |