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