OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:analyzer/dart/element/element.dart'; | 5 import 'package:analyzer/dart/element/element.dart'; |
6 import 'package:analyzer/src/generated/error.dart'; | 6 import 'package:analyzer/src/generated/error.dart'; |
7 import 'package:analyzer/src/generated/source.dart'; | 7 import 'package:analyzer/src/generated/source.dart'; |
8 import 'package:analyzer/src/summary/incremental_cache.dart'; | 8 import 'package:analyzer/src/summary/incremental_cache.dart'; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 | 10 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 } | 276 } |
277 } | 277 } |
278 | 278 |
279 /** | 279 /** |
280 * A [Map] based [CacheStorage]. | 280 * A [Map] based [CacheStorage]. |
281 */ | 281 */ |
282 class _TestCacheStorage implements CacheStorage { | 282 class _TestCacheStorage implements CacheStorage { |
283 final Map<String, List<int>> map = <String, List<int>>{}; | 283 final Map<String, List<int>> map = <String, List<int>>{}; |
284 | 284 |
285 @override | 285 @override |
| 286 void compact() {} |
| 287 |
| 288 @override |
286 List<int> get(String key) { | 289 List<int> get(String key) { |
287 return map[key]; | 290 return map[key]; |
288 } | 291 } |
289 | 292 |
290 @override | 293 @override |
291 void put(String key, List<int> bytes) { | 294 void put(String key, List<int> bytes) { |
292 map[key] = bytes; | 295 map[key] = bytes; |
293 } | 296 } |
294 } | 297 } |
OLD | NEW |