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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 'throwExpression': 'throwExpression(e) {}', | 251 'throwExpression': 'throwExpression(e) {}', |
252 'throwNoSuchMethod': | 252 'throwNoSuchMethod': |
253 'throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {}', | 253 'throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {}', |
254 'throwRuntimeError': 'throwRuntimeError(message) {}', | 254 'throwRuntimeError': 'throwRuntimeError(message) {}', |
255 'throwTypeError': 'throwTypeError(message) {}', | 255 'throwTypeError': 'throwTypeError(message) {}', |
256 'TypeImpl': 'class TypeImpl {}', | 256 'TypeImpl': 'class TypeImpl {}', |
257 'TypeVariable': '''class TypeVariable { | 257 'TypeVariable': '''class TypeVariable { |
258 final Type owner; | 258 final Type owner; |
259 final String name; | 259 final String name; |
260 final int bound; | 260 final int bound; |
261 TypeVariable(this.owner, this.name, this.bound); | 261 const TypeVariable(this.owner, this.name, this.bound); |
262 }''', | 262 }''', |
263 'unwrapException': 'unwrapException(e) {}', | 263 'unwrapException': 'unwrapException(e) {}', |
264 'voidTypeCheck': 'voidTypeCheck(value) {}', | 264 'voidTypeCheck': 'voidTypeCheck(value) {}', |
265 'wrapException': 'wrapException(x) { return x; }', | 265 'wrapException': 'wrapException(x) { return x; }', |
266 'badMain': 'badMain() { throw "bad main"; }', | 266 'badMain': 'badMain() { throw "bad main"; }', |
267 'missingMain': 'missingMain() { throw "missing main"; }', | 267 'missingMain': 'missingMain() { throw "missing main"; }', |
268 'mainHasTooManyParameters': | 268 'mainHasTooManyParameters': |
269 'mainHasTooManyParameters() ' | 269 'mainHasTooManyParameters() ' |
270 '{ throw "main has too many parameters"; }', | 270 '{ throw "main has too many parameters"; }', |
271 }; | 271 }; |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 460 |
461 const LookupMap(this._entries, [this._nestedMaps = const []]) | 461 const LookupMap(this._entries, [this._nestedMaps = const []]) |
462 : _key = null, _value = null; | 462 : _key = null, _value = null; |
463 | 463 |
464 const LookupMap.pair(this._key, this._value) | 464 const LookupMap.pair(this._key, this._value) |
465 : _entries = const [], _nestedMaps = const []; | 465 : _entries = const [], _nestedMaps = const []; |
466 V operator[](K k) => null; | 466 V operator[](K k) => null; |
467 }''', | 467 }''', |
468 '_version': 'const _version = "0.0.1+1";', | 468 '_version': 'const _version = "0.0.1+1";', |
469 }; | 469 }; |
OLD | NEW |