| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 'print': 'print(var obj) {}', | 74 'print': 'print(var obj) {}', |
| 75 'proxy': 'const proxy = 0;', | 75 'proxy': 'const proxy = 0;', |
| 76 'Object': r''' | 76 'Object': r''' |
| 77 class Object { | 77 class Object { |
| 78 const Object(); | 78 const Object(); |
| 79 operator ==(other) { return true; } | 79 operator ==(other) { return true; } |
| 80 get hashCode => throw "Object.hashCode not implemented."; | 80 get hashCode => throw "Object.hashCode not implemented."; |
| 81 String toString() { return null; } | 81 String toString() { return null; } |
| 82 noSuchMethod(im) { throw im; } | 82 noSuchMethod(im) { throw im; } |
| 83 }''', | 83 }''', |
| 84 'Resource': 'class Resource {}', |
| 84 'StackTrace': 'abstract class StackTrace {}', | 85 'StackTrace': 'abstract class StackTrace {}', |
| 85 'String': 'class String implements Pattern {}', | 86 'String': 'class String implements Pattern {}', |
| 86 'Symbol': 'class Symbol { final name; const Symbol(this.name); }', | 87 'Symbol': 'class Symbol { final name; const Symbol(this.name); }', |
| 87 'Type': 'class Type {}', | 88 'Type': 'class Type {}', |
| 88 'Pattern': 'abstract class Pattern {}', | 89 'Pattern': 'abstract class Pattern {}', |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 const String DEFAULT_PATCH_CORE_SOURCE = r''' | 92 const String DEFAULT_PATCH_CORE_SOURCE = r''' |
| 92 import 'dart:_js_helper'; | 93 import 'dart:_js_helper'; |
| 93 import 'dart:_interceptors'; | 94 import 'dart:_interceptors'; |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 const Map<String, String> ASYNC_AWAIT_LIBRARY = const <String, String>{ | 391 const Map<String, String> ASYNC_AWAIT_LIBRARY = const <String, String>{ |
| 391 '_wrapJsFunctionForAsync': '_wrapJsFunctionForAsync(f) {}', | 392 '_wrapJsFunctionForAsync': '_wrapJsFunctionForAsync(f) {}', |
| 392 '_asyncHelper': '_asyncHelper(o, f, c) {}', | 393 '_asyncHelper': '_asyncHelper(o, f, c) {}', |
| 393 }; | 394 }; |
| 394 | 395 |
| 395 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ | 396 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ |
| 396 'Comment': 'class Comment {}', | 397 'Comment': 'class Comment {}', |
| 397 'MirrorSystem': 'class MirrorSystem {}', | 398 'MirrorSystem': 'class MirrorSystem {}', |
| 398 'MirrorsUsed': 'class MirrorsUsed {}', | 399 'MirrorsUsed': 'class MirrorsUsed {}', |
| 399 }; | 400 }; |
| OLD | NEW |