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 analyzer.test.src.context.mock_sdk; | 5 library analyzer.test.src.context.mock_sdk; |
6 | 6 |
7 import 'package:analyzer/file_system/file_system.dart' as resource; | 7 import 'package:analyzer/file_system/file_system.dart' as resource; |
8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; | 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; |
9 import 'package:analyzer/src/context/cache.dart'; | 9 import 'package:analyzer/src/context/cache.dart'; |
10 import 'package:analyzer/src/context/context.dart'; | 10 import 'package:analyzer/src/context/context.dart'; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 class Map<K, V> extends Object { | 217 class Map<K, V> extends Object { |
218 Iterable<K> get keys => null; | 218 Iterable<K> get keys => null; |
219 V operator [](K key) => null; | 219 V operator [](K key) => null; |
220 void operator []=(K key, V value) {} | 220 void operator []=(K key, V value) {} |
221 } | 221 } |
222 | 222 |
223 external bool identical(Object a, Object b); | 223 external bool identical(Object a, Object b); |
224 | 224 |
225 void print(Object object) {} | 225 void print(Object object) {} |
226 | 226 |
| 227 const proxy = const _Proxy(); |
| 228 class _Proxy { const _Proxy(); } |
| 229 |
227 class _Override { | 230 class _Override { |
228 const _Override(); | 231 const _Override(); |
229 } | 232 } |
230 const Object override = const _Override(); | 233 const Object override = const _Override(); |
231 '''); | 234 '''); |
232 | 235 |
233 const _MockSdkLibrary _LIB_FOREIGN_HELPER = const _MockSdkLibrary( | 236 const _MockSdkLibrary _LIB_FOREIGN_HELPER = const _MockSdkLibrary( |
234 'dart:_foreign_helper', | 237 'dart:_foreign_helper', |
235 '/lib/_foreign_helper/_foreign_helper.dart', | 238 '/lib/_foreign_helper/_foreign_helper.dart', |
236 ''' | 239 ''' |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 | 439 |
437 @override | 440 @override |
438 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 441 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
439 if (factory == null) { | 442 if (factory == null) { |
440 return super.createCacheFromSourceFactory(factory); | 443 return super.createCacheFromSourceFactory(factory); |
441 } | 444 } |
442 return new AnalysisCache( | 445 return new AnalysisCache( |
443 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 446 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
444 } | 447 } |
445 } | 448 } |
OLD | NEW |