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

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

Issue 551933003: rename completion class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 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 | 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.toplevel; 5 library test.services.completion.toplevel;
6 6
7 import 'package:analysis_server/src/protocol.dart'; 7 import 'package:analysis_server/src/protocol.dart';
8 import 'package:analysis_server/src/services/completion/imported_type_computer.d art'; 8 import 'package:analysis_server/src/services/completion/imported_computer.dart';
9 import '../../reflective_tests.dart'; 9 import '../../reflective_tests.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
11 11
12 import 'completion_test_util.dart'; 12 import 'completion_test_util.dart';
13 13
14 main() { 14 main() {
15 groupSep = ' | '; 15 groupSep = ' | ';
16 runReflectiveTests(ImportedTypeComputerTest); 16 runReflectiveTests(ImportedTypeComputerTest);
17 } 17 }
18 18
19 @ReflectiveTestCase() 19 @ReflectiveTestCase()
20 class ImportedTypeComputerTest extends AbstractCompletionTest { 20 class ImportedTypeComputerTest extends AbstractCompletionTest {
21 21
22 @override 22 @override
23 void setUp() { 23 void setUp() {
24 super.setUp(); 24 super.setUp();
25 computer = new ImportedTypeComputer(); 25 computer = new ImportedComputer();
26 } 26 }
27 27
28 test_class() { 28 test_class() {
29 addSource('/testA.dart', 'class A {int x;} class _B { }'); 29 addSource('/testA.dart', 'class A {int x;} class _B { }');
30 addTestSource('import "/testA.dart"; class C {foo(){^}}'); 30 addTestSource('import "/testA.dart"; class C {foo(){^}}');
31 return computeFull().then((_) { 31 return computeFull().then((_) {
32 assertSuggestClass('A'); 32 assertSuggestClass('A');
33 assertNotSuggested('x'); 33 assertNotSuggested('x');
34 assertNotSuggested('_B'); 34 assertNotSuggested('_B');
35 // Should not suggest compilation unit elements 35 // Should not suggest compilation unit elements
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 test_topLevelVar_notImported() { 193 test_topLevelVar_notImported() {
194 addSource('/testA.dart', 'var T1; var _T2;'); 194 addSource('/testA.dart', 'var T1; var _T2;');
195 addTestSource('class C {foo(){^}}'); 195 addTestSource('class C {foo(){^}}');
196 return computeFull(true).then((_) { 196 return computeFull(true).then((_) {
197 assertSuggestTopLevelVar('T1', CompletionRelevance.LOW); 197 assertSuggestTopLevelVar('T1', CompletionRelevance.LOW);
198 assertNotSuggested('_T2'); 198 assertNotSuggested('_T2');
199 }); 199 });
200 } 200 }
201 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698