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

Side by Side Diff: pkg/analysis_server/test/services/completion/completion_manager_test.dart

Issue 723263004: make completion managers responsible for their own caches (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years 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 | Annotate | Revision Log
OLDNEW
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 test.services.completion.manager; 5 library test.services.completion.manager;
6 6
7 import 'package:analysis_server/src/services/completion/completion_manager.dart' ; 7 import 'package:analysis_server/src/services/completion/completion_manager.dart' ;
8 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 8 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
9 import 'package:analyzer/src/generated/source.dart'; 9 import 'package:analyzer/src/generated/source.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
11 11
12 import '../../abstract_context.dart'; 12 import '../../abstract_context.dart';
13 import '../../reflective_tests.dart'; 13 import '../../reflective_tests.dart';
14 14
15 main() { 15 main() {
16 groupSep = ' | '; 16 groupSep = ' | ';
17 runReflectiveTests(CompletionManagerTest); 17 runReflectiveTests(CompletionManagerTest);
18 } 18 }
19 19
20 @ReflectiveTestCase() 20 @ReflectiveTestCase()
21 class CompletionManagerTest extends AbstractContextTest { 21 class CompletionManagerTest extends AbstractContextTest {
22 var perf = new CompletionPerformance(); 22 var perf = new CompletionPerformance();
23 var cache = null; 23 var cache = null;
24 24
25 test_dart() { 25 test_dart() {
26 Source source = addSource('/does/not/exist.dart', ''); 26 Source source = addSource('/does/not/exist.dart', '');
27 var manager = 27 var manager =
28 new CompletionManager.create(context, source, 0, null, cache, perf); 28 new CompletionManager.create(context, source, null, cache);
29 expect(manager.runtimeType, DartCompletionManager); 29 expect(manager.runtimeType, DartCompletionManager);
30 } 30 }
31 31
32 test_html() { 32 test_html() {
33 Source source = addSource('/does/not/exist.html', ''); 33 Source source = addSource('/does/not/exist.html', '');
34 var manager = 34 var manager =
35 new CompletionManager.create(context, source, 0, null, cache, perf); 35 new CompletionManager.create(context, source, null, cache);
36 expect(manager.runtimeType, NoOpCompletionManager); 36 expect(manager.runtimeType, NoOpCompletionManager);
37 } 37 }
38 38
39 test_null_context() { 39 test_null_context() {
40 Source source = addSource('/does/not/exist.dart', ''); 40 Source source = addSource('/does/not/exist.dart', '');
41 var manager = 41 var manager =
42 new CompletionManager.create(null, source, 0, null, cache, perf); 42 new CompletionManager.create(null, source, null, cache);
43 expect(manager.runtimeType, NoOpCompletionManager); 43 expect(manager.runtimeType, NoOpCompletionManager);
44 } 44 }
45 45
46 test_other() { 46 test_other() {
47 Source source = addSource('/does/not/exist.foo', ''); 47 Source source = addSource('/does/not/exist.foo', '');
48 var manager = 48 var manager =
49 new CompletionManager.create(context, source, 0, null, cache, perf); 49 new CompletionManager.create(context, source, null, cache);
50 expect(manager.runtimeType, NoOpCompletionManager); 50 expect(manager.runtimeType, NoOpCompletionManager);
51 } 51 }
52 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698