| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 '''; | 93 '''; |
| 94 | 94 |
| 95 const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{ | 95 const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{ |
| 96 'assertHelper': 'assertHelper(a) {}', | 96 'assertHelper': 'assertHelper(a) {}', |
| 97 'assertIsSubtype': 'assertIsSubtype(subtype, supertype, message) {}', | 97 'assertIsSubtype': 'assertIsSubtype(subtype, supertype, message) {}', |
| 98 'assertSubtype': 'assertSubtype(object, isField, checks, asField) {}', | 98 'assertSubtype': 'assertSubtype(object, isField, checks, asField) {}', |
| 99 'assertSubtypeOfRuntimeType': 'assertSubtypeOfRuntimeType(object, type) {}', | 99 'assertSubtypeOfRuntimeType': 'assertSubtypeOfRuntimeType(object, type) {}', |
| 100 'boolConversionCheck': 'boolConversionCheck(x) {}', | 100 'boolConversionCheck': 'boolConversionCheck(x) {}', |
| 101 'boolTypeCast': 'boolTypeCast(value) {}', | 101 'boolTypeCast': 'boolTypeCast(value) {}', |
| 102 'boolTypeCheck': 'boolTypeCheck(value) {}', | 102 'boolTypeCheck': 'boolTypeCheck(value) {}', |
| 103 'checkSubtype': 'checkSubtype(object, isField, checks, asField) {}', | |
| 104 'checkSubtypeOfRuntimeType': 'checkSubtypeOfRuntimeType(o, t) {}', | |
| 105 'BoundClosure': r'''abstract class BoundClosure extends Closure { | 103 'BoundClosure': r'''abstract class BoundClosure extends Closure { |
| 106 var self; | 104 var self; |
| 107 var target; | 105 var target; |
| 108 var receiver; | 106 var receiver; |
| 109 }''', | 107 }''', |
| 110 'buildFunctionType': | 108 'buildFunctionType': |
| 111 r'''buildFunctionType(returnType, parameterTypes, | 109 r'''buildFunctionType(returnType, parameterTypes, |
| 112 optionalParameterTypes) { | 110 optionalParameterTypes) { |
| 113 return new RuntimeFunctionType(); | 111 return new RuntimeFunctionType(); |
| 114 }''', | 112 }''', |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 'stringSuperNativeTypeCast': 'stringSuperNativeTypeCast(value) {}', | 198 'stringSuperNativeTypeCast': 'stringSuperNativeTypeCast(value) {}', |
| 201 'stringSuperNativeTypeCheck': 'stringSuperNativeTypeCheck(value) {}', | 199 'stringSuperNativeTypeCheck': 'stringSuperNativeTypeCheck(value) {}', |
| 202 'stringSuperTypeCast': 'stringSuperTypeCast(value) {}', | 200 'stringSuperTypeCast': 'stringSuperTypeCast(value) {}', |
| 203 'stringSuperTypeCheck': 'stringSuperTypeCheck(value) {}', | 201 'stringSuperTypeCheck': 'stringSuperTypeCheck(value) {}', |
| 204 'stringTypeCast': 'stringTypeCast(x) {}', | 202 'stringTypeCast': 'stringTypeCast(x) {}', |
| 205 'stringTypeCheck': 'stringTypeCheck(x) {}', | 203 'stringTypeCheck': 'stringTypeCheck(x) {}', |
| 206 'subtypeCast': 'subtypeCast(object, isField, checks, asField) {}', | 204 'subtypeCast': 'subtypeCast(object, isField, checks, asField) {}', |
| 207 'subtypeOfRuntimeTypeCast': 'subtypeOfRuntimeTypeCast(object, type) {}', | 205 'subtypeOfRuntimeTypeCast': 'subtypeOfRuntimeTypeCast(object, type) {}', |
| 208 'throwAbstractClassInstantiationError': | 206 'throwAbstractClassInstantiationError': |
| 209 'throwAbstractClassInstantiationError(className) {}', | 207 'throwAbstractClassInstantiationError(className) {}', |
| 210 'throwCyclicInit': 'throwCyclicInit(staticName) {}', | 208 'throwCyclicInit': 'throwCyclicInit() {}', |
| 211 'throwExpression': 'throwExpression(e) {}', | 209 'throwExpression': 'throwExpression(e) {}', |
| 212 'throwNoSuchMethod': | 210 'throwNoSuchMethod': |
| 213 'throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {}', | 211 'throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {}', |
| 214 'throwRuntimeError': 'throwRuntimeError(message) {}', | 212 'throwRuntimeError': 'throwRuntimeError(message) {}', |
| 215 'throwTypeError': 'throwTypeError(message) {}', | 213 'throwTypeError': 'throwTypeError(message) {}', |
| 216 'TypeImpl': 'class TypeImpl {}', | 214 'TypeImpl': 'class TypeImpl {}', |
| 217 'TypeVariable': 'class TypeVariable {}', | 215 'TypeVariable': 'class TypeVariable {}', |
| 218 'unwrapException': 'unwrapException(e) {}', | 216 'unwrapException': 'unwrapException(e) {}', |
| 219 'voidTypeCheck': 'voidTypeCheck(value) {}', | 217 'voidTypeCheck': 'voidTypeCheck(value) {}', |
| 220 'wrapException': 'wrapException(x) { return x; }', | 218 'wrapException': 'wrapException(x) { return x; }', |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{ | 361 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{ |
| 364 'Future': 'class Future<T> {}', | 362 'Future': 'class Future<T> {}', |
| 365 'Stream': 'class Stream<T> {}', | 363 'Stream': 'class Stream<T> {}', |
| 366 }; | 364 }; |
| 367 | 365 |
| 368 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ | 366 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ |
| 369 'Comment': 'class Comment {}', | 367 'Comment': 'class Comment {}', |
| 370 'MirrorSystem': 'class MirrorSystem {}', | 368 'MirrorSystem': 'class MirrorSystem {}', |
| 371 'MirrorsUsed': 'class MirrorsUsed {}', | 369 'MirrorsUsed': 'class MirrorsUsed {}', |
| 372 }; | 370 }; |
| OLD | NEW |