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 const DEFAULT_PLATFORM_CONFIG = """ | 9 const DEFAULT_PLATFORM_CONFIG = """ |
10 [libraries] | 10 [libraries] |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 'print': 'print(var obj) {}', | 92 'print': 'print(var obj) {}', |
93 'proxy': 'const proxy = 0;', | 93 'proxy': 'const proxy = 0;', |
94 'Object': r''' | 94 'Object': r''' |
95 class Object { | 95 class Object { |
96 const Object(); | 96 const Object(); |
97 operator ==(other) { return true; } | 97 operator ==(other) { return true; } |
98 get hashCode => throw "Object.hashCode not implemented."; | 98 get hashCode => throw "Object.hashCode not implemented."; |
99 String toString() { return null; } | 99 String toString() { return null; } |
100 noSuchMethod(im) { throw im; } | 100 noSuchMethod(im) { throw im; } |
101 }''', | 101 }''', |
102 'Resource': 'class Resource {}', | |
103 'StackTrace': 'abstract class StackTrace {}', | 102 'StackTrace': 'abstract class StackTrace {}', |
104 'String': 'class String implements Pattern {}', | 103 'String': 'class String implements Pattern {}', |
105 'Symbol': ''' | 104 'Symbol': ''' |
106 abstract class Symbol { | 105 abstract class Symbol { |
107 const factory Symbol(String name) = internal.Symbol; | 106 const factory Symbol(String name) = internal.Symbol; |
108 } | 107 } |
109 ''', | 108 ''', |
110 'Type': 'class Type {}', | 109 'Type': 'class Type {}', |
111 'Pattern': 'abstract class Pattern {}', | 110 'Pattern': 'abstract class Pattern {}', |
112 '_genericNoSuchMethod': '_genericNoSuchMethod(a,b,c,d,e) {}', | 111 '_genericNoSuchMethod': '_genericNoSuchMethod(a,b,c,d,e) {}', |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 | 484 |
486 const LookupMap(this._entries, [this._nestedMaps = const []]) | 485 const LookupMap(this._entries, [this._nestedMaps = const []]) |
487 : _key = null, _value = null; | 486 : _key = null, _value = null; |
488 | 487 |
489 const LookupMap.pair(this._key, this._value) | 488 const LookupMap.pair(this._key, this._value) |
490 : _entries = const [], _nestedMaps = const []; | 489 : _entries = const [], _nestedMaps = const []; |
491 V operator[](K k) => null; | 490 V operator[](K k) => null; |
492 }''', | 491 }''', |
493 '_version': 'const _version = "0.0.1+1";', | 492 '_version': 'const _version = "0.0.1+1";', |
494 }; | 493 }; |
OLD | NEW |