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 21 matching lines...) Expand all Loading... |
32 class Deprecated extends Object { | 32 class Deprecated extends Object { |
33 final String expires; | 33 final String expires; |
34 const Deprecated(this.expires); | 34 const Deprecated(this.expires); |
35 }''', | 35 }''', |
36 'deprecated': 'const Object deprecated = const Deprecated("next release");', | 36 'deprecated': 'const Object deprecated = const Deprecated("next release");', |
37 'double': r''' | 37 'double': r''' |
38 abstract class double extends num { | 38 abstract class double extends num { |
39 static var NAN = 0; | 39 static var NAN = 0; |
40 static parse(s) {} | 40 static parse(s) {} |
41 }''', | 41 }''', |
42 'Function': 'class Function {}', | 42 'Function': r''' |
| 43 class Function { |
| 44 static apply(Function fn, List positional, [Map named]) => null; |
| 45 }''', |
43 'identical': 'bool identical(Object a, Object b) { return true; }', | 46 'identical': 'bool identical(Object a, Object b) { return true; }', |
44 'int': 'abstract class int extends num { }', | 47 'int': 'abstract class int extends num { }', |
45 'Iterable': 'abstract class Iterable {}', | 48 'Iterable': 'abstract class Iterable {}', |
46 'LinkedHashMap': r''' | 49 'LinkedHashMap': r''' |
47 class LinkedHashMap { | 50 class LinkedHashMap { |
48 factory LinkedHashMap._empty() => null; | 51 factory LinkedHashMap._empty() => null; |
49 factory LinkedHashMap._literal(elements) => null; | 52 factory LinkedHashMap._literal(elements) => null; |
50 static _makeEmpty() => null; | 53 static _makeEmpty() => null; |
51 static _makeLiteral(elements) => null; | 54 static _makeLiteral(elements) => null; |
52 }''', | 55 }''', |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 final _nestedMaps; | 428 final _nestedMaps; |
426 | 429 |
427 const LookupMap(this._entries, [this._nestedMaps = const []]) | 430 const LookupMap(this._entries, [this._nestedMaps = const []]) |
428 : _key = null, _value = null; | 431 : _key = null, _value = null; |
429 | 432 |
430 const LookupMap.pair(this._key, this._value) | 433 const LookupMap.pair(this._key, this._value) |
431 : _entries = const [], _nestedMaps = const []; | 434 : _entries = const [], _nestedMaps = const []; |
432 V operator[](K k) => null; | 435 V operator[](K k) => null; |
433 }''', | 436 }''', |
434 }; | 437 }; |
OLD | NEW |