Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: pkg/analyzer/test/src/summary/incremental_cache_test.dart

Issue 2064613004: Compact incremental cache when we're done using it. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/incremental_cache.dart ('k') | pkg/analyzer_cli/lib/src/incremental_analyzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698