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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 import 'dart:_js_helper'; | 103 import 'dart:_js_helper'; |
104 import 'dart:_interceptors'; | 104 import 'dart:_interceptors'; |
105 import 'dart:_isolate_helper'; | 105 import 'dart:_isolate_helper'; |
106 import 'dart:async'; | 106 import 'dart:async'; |
107 '''; | 107 '''; |
108 | 108 |
109 const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{ | 109 const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{ |
110 'assertTest': 'assertTest(a) {}', | 110 'assertTest': 'assertTest(a) {}', |
111 'assertThrow': 'assertThrow(a) {}', | 111 'assertThrow': 'assertThrow(a) {}', |
112 'assertHelper': 'assertHelper(a) {}', | 112 'assertHelper': 'assertHelper(a) {}', |
| 113 'assertUnreachable': 'assertUnreachable() {}', |
113 'assertIsSubtype': 'assertIsSubtype(subtype, supertype, message) {}', | 114 'assertIsSubtype': 'assertIsSubtype(subtype, supertype, message) {}', |
114 'assertSubtype': 'assertSubtype(object, isField, checks, asField) {}', | 115 'assertSubtype': 'assertSubtype(object, isField, checks, asField) {}', |
115 'assertSubtypeOfRuntimeType': 'assertSubtypeOfRuntimeType(object, type) {}', | 116 'assertSubtypeOfRuntimeType': 'assertSubtypeOfRuntimeType(object, type) {}', |
116 'asyncHelper': 'asyncHelper(object, asyncBody, completer) {}', | 117 'asyncHelper': 'asyncHelper(object, asyncBody, completer) {}', |
117 'boolConversionCheck': 'boolConversionCheck(x) {}', | 118 'boolConversionCheck': 'boolConversionCheck(x) {}', |
118 'boolTypeCast': 'boolTypeCast(value) {}', | 119 'boolTypeCast': 'boolTypeCast(value) {}', |
119 'boolTypeCheck': 'boolTypeCheck(value) {}', | 120 'boolTypeCheck': 'boolTypeCheck(value) {}', |
120 'checkSubtype': 'checkSubtype(object, isField, checks, asField) {}', | 121 'checkSubtype': 'checkSubtype(object, isField, checks, asField) {}', |
121 'checkSubtypeOfRuntimeType': 'checkSubtypeOfRuntimeType(o, t) {}', | 122 'checkSubtypeOfRuntimeType': 'checkSubtypeOfRuntimeType(o, t) {}', |
122 'BoundClosure': r'''abstract class BoundClosure extends Closure { | 123 'BoundClosure': r'''abstract class BoundClosure extends Closure { |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 440 |
440 const LookupMap(this._entries, [this._nestedMaps = const []]) | 441 const LookupMap(this._entries, [this._nestedMaps = const []]) |
441 : _key = null, _value = null; | 442 : _key = null, _value = null; |
442 | 443 |
443 const LookupMap.pair(this._key, this._value) | 444 const LookupMap.pair(this._key, this._value) |
444 : _entries = const [], _nestedMaps = const []; | 445 : _entries = const [], _nestedMaps = const []; |
445 V operator[](K k) => null; | 446 V operator[](K k) => null; |
446 }''', | 447 }''', |
447 '_version': 'const _version = "0.0.1+1";', | 448 '_version': 'const _version = "0.0.1+1";', |
448 }; | 449 }; |
OLD | NEW |