| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 /*=R*/ combine(/*=R*/ previousValue, E element)); | 151 /*=R*/ combine(/*=R*/ previousValue, E element)); |
| 152 } | 152 } |
| 153 | 153 |
| 154 class List<E> implements Iterable<E> { | 154 class List<E> implements Iterable<E> { |
| 155 List(); | 155 List(); |
| 156 void add(E value) {} | 156 void add(E value) {} |
| 157 E operator [](int index) => null; | 157 E operator [](int index) => null; |
| 158 void operator []=(int index, E value) {} | 158 void operator []=(int index, E value) {} |
| 159 Iterator<E> get iterator => null; | 159 Iterator<E> get iterator => null; |
| 160 void clear() {} | 160 void clear() {} |
| 161 |
| 162 bool get isEmpty => false; |
| 163 E get first => null; |
| 164 |
| 165 Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e)) => null; |
| 166 |
| 167 /*=R*/ fold/*<R>*/(/*=R*/ initialValue, |
| 168 /*=R*/ combine(/*=R*/ previousValue, E element)) => null; |
| 169 |
| 161 } | 170 } |
| 162 | 171 |
| 163 class Map<K, V> extends Object { | 172 class Map<K, V> extends Object { |
| 164 Iterable<K> get keys => null; | 173 Iterable<K> get keys => null; |
| 165 V operator [](K key) => null; | 174 V operator [](K key) => null; |
| 166 void operator []=(K key, V value) {} | 175 void operator []=(K key, V value) {} |
| 167 } | 176 } |
| 168 | 177 |
| 169 external bool identical(Object a, Object b); | 178 external bool identical(Object a, Object b); |
| 170 | 179 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 391 |
| 383 @override | 392 @override |
| 384 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 393 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
| 385 if (factory == null) { | 394 if (factory == null) { |
| 386 return super.createCacheFromSourceFactory(factory); | 395 return super.createCacheFromSourceFactory(factory); |
| 387 } | 396 } |
| 388 return new AnalysisCache( | 397 return new AnalysisCache( |
| 389 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 398 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 390 } | 399 } |
| 391 } | 400 } |
| OLD | NEW |