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 29 matching lines...) Expand all Loading... |
40 static parse(s) {} | 40 static parse(s) {} |
41 }''', | 41 }''', |
42 'Function': 'class Function {}', | 42 'Function': 'class Function {}', |
43 'identical': 'bool identical(Object a, Object b) { return true; }', | 43 'identical': 'bool identical(Object a, Object b) { return true; }', |
44 'int': 'abstract class int extends num { }', | 44 'int': 'abstract class int extends num { }', |
45 'Iterable': 'abstract class Iterable {}', | 45 'Iterable': 'abstract class Iterable {}', |
46 'LinkedHashMap': r''' | 46 'LinkedHashMap': r''' |
47 class LinkedHashMap { | 47 class LinkedHashMap { |
48 factory LinkedHashMap._empty() => null; | 48 factory LinkedHashMap._empty() => null; |
49 factory LinkedHashMap._literal(elements) => null; | 49 factory LinkedHashMap._literal(elements) => null; |
| 50 static _makeEmpty() => null; |
| 51 static _makeLiteral(elements) => null; |
50 }''', | 52 }''', |
51 'List': r''' | 53 'List': r''' |
52 class List<E> { | 54 class List<E> { |
53 var length; | 55 var length; |
54 List([length]); | 56 List([length]); |
55 List.filled(length, element); | 57 List.filled(length, element); |
56 E get first => null; | 58 E get first => null; |
57 E get last => null; | 59 E get last => null; |
58 E get single => null; | 60 E get single => null; |
59 E removeLast() => null; | 61 E removeLast() => null; |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 'Stream': 'class Stream<T> {}', | 377 'Stream': 'class Stream<T> {}', |
376 'Completer': 'class Completer<T> {}', | 378 'Completer': 'class Completer<T> {}', |
377 'StreamIterator': 'class StreamIterator<T> {}', | 379 'StreamIterator': 'class StreamIterator<T> {}', |
378 }; | 380 }; |
379 | 381 |
380 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ | 382 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ |
381 'Comment': 'class Comment {}', | 383 'Comment': 'class Comment {}', |
382 'MirrorSystem': 'class MirrorSystem {}', | 384 'MirrorSystem': 'class MirrorSystem {}', |
383 'MirrorsUsed': 'class MirrorsUsed {}', | 385 'MirrorsUsed': 'class MirrorsUsed {}', |
384 }; | 386 }; |
OLD | NEW |