| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 }''', | 63 }''', |
| 64 'Map': 'abstract class Map<K,V> {}', | 64 'Map': 'abstract class Map<K,V> {}', |
| 65 'Null': 'class Null {}', | 65 'Null': 'class Null {}', |
| 66 'num': r''' | 66 'num': r''' |
| 67 abstract class num { | 67 abstract class num { |
| 68 operator +(_); | 68 operator +(_); |
| 69 operator *(_); | 69 operator *(_); |
| 70 operator -(); | 70 operator -(); |
| 71 }''', | 71 }''', |
| 72 'print': 'print(var obj) {}', | 72 'print': 'print(var obj) {}', |
| 73 'proxy': 'const proxy = const _Proxy();', | 73 'proxy': 'const proxy = 0;', |
| 74 '_Proxy': ''' | |
| 75 class _Proxy { | |
| 76 const _Proxy(); | |
| 77 }''', | |
| 78 'Object': r''' | 74 'Object': r''' |
| 79 class Object { | 75 class Object { |
| 80 const Object(); | 76 const Object(); |
| 81 operator ==(other) { return true; } | 77 operator ==(other) { return true; } |
| 82 get hashCode => throw "Object.hashCode not implemented."; | 78 get hashCode => throw "Object.hashCode not implemented."; |
| 83 String toString() { return null; } | 79 String toString() { return null; } |
| 84 noSuchMethod(im) { throw im; } | 80 noSuchMethod(im) { throw im; } |
| 85 }''', | 81 }''', |
| 86 'StackTrace': 'abstract class StackTrace {}', | 82 'StackTrace': 'abstract class StackTrace {}', |
| 87 'String': 'class String implements Pattern {}', | 83 'String': 'class String implements Pattern {}', |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 'Stream': 'class Stream<T> {}', | 369 'Stream': 'class Stream<T> {}', |
| 374 'Completer': 'class Completer<T> {}', | 370 'Completer': 'class Completer<T> {}', |
| 375 'StreamIterator': 'class StreamIterator<T> {}', | 371 'StreamIterator': 'class StreamIterator<T> {}', |
| 376 }; | 372 }; |
| 377 | 373 |
| 378 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ | 374 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ |
| 379 'Comment': 'class Comment {}', | 375 'Comment': 'class Comment {}', |
| 380 'MirrorSystem': 'class MirrorSystem {}', | 376 'MirrorSystem': 'class MirrorSystem {}', |
| 381 'MirrorsUsed': 'class MirrorsUsed {}', | 377 'MirrorsUsed': 'class MirrorsUsed {}', |
| 382 }; | 378 }; |
| OLD | NEW |