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

Side by Side Diff: pkg/analyzer/test/src/util/lru_map_test.dart

Issue 2298913003: Pull in test_reflective_loader 0.0.4 and switch analyzer to it. (Closed)
Patch Set: Fixes for review comments. Created 4 years, 3 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
« DEPS ('K') | « pkg/analyzer/test/src/util/glob_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.util.lru_map_test; 5 library analyzer.test.src.util.lru_map_test;
6 6
7 import 'package:analyzer/src/util/lru_map.dart'; 7 import 'package:analyzer/src/util/lru_map.dart';
8 import 'package:test_reflective_loader/test_reflective_loader.dart';
8 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
9 10
10 import '../../reflective_tests.dart';
11 import '../../utils.dart'; 11 import '../../utils.dart';
12 12
13 main() { 13 main() {
14 initializeTestEnvironment(); 14 initializeTestEnvironment();
15 runReflectiveTests(_LRUCacheTest); 15 defineReflectiveTests(_LRUCacheTest);
16 } 16 }
17 17
18 @reflectiveTest 18 @reflectiveTest
19 class _LRUCacheTest { 19 class _LRUCacheTest {
20 LRUMap<int, String> cache = new LRUMap<int, String>(3); 20 LRUMap<int, String> cache = new LRUMap<int, String>(3);
21 21
22 void test_evict_notGet() { 22 void test_evict_notGet() {
23 List<int> evictedKeys = new List<int>(); 23 List<int> evictedKeys = new List<int>();
24 List<String> evictedValues = new List<String>(); 24 List<String> evictedValues = new List<String>();
25 cache = new LRUMap<int, String>(3, (int key, String value) { 25 cache = new LRUMap<int, String>(3, (int key, String value) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 cache.put(3, 'C'); 87 cache.put(3, 'C');
88 // remove 88 // remove
89 cache.remove(1); 89 cache.remove(1);
90 cache.remove(3); 90 cache.remove(3);
91 // check 91 // check
92 expect(cache.get(1), isNull); 92 expect(cache.get(1), isNull);
93 expect(cache.get(2), 'B'); 93 expect(cache.get(2), 'B');
94 expect(cache.get(3), isNull); 94 expect(cache.get(3), isNull);
95 } 95 }
96 } 96 }
OLDNEW
« DEPS ('K') | « pkg/analyzer/test/src/util/glob_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698