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

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

Issue 565793002: fix code completion import dart exception (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
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/imported_computer.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) 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_computer.dart'; 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';
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 156
157 test_local_name2() { 157 test_local_name2() {
158 addSource('/testA.dart', 'var T1;'); 158 addSource('/testA.dart', 'var T1;');
159 addTestSource('import "/testA.dart"; class C {a() {var ^}}'); 159 addTestSource('import "/testA.dart"; class C {a() {var ^}}');
160 return computeFull().then((_) { 160 return computeFull().then((_) {
161 assertNotSuggested('T1'); 161 assertNotSuggested('T1');
162 }); 162 });
163 } 163 }
164 164
165 test_import_dart() {
166 addTestSource('import "dart^"; main() {}');
167 return computeFull().then((_) {
168 assertNotSuggested('T1');
169 });
170 }
171
165 test_topLevelVar() { 172 test_topLevelVar() {
166 addSource('/testA.dart', 'String T1; var _T2;'); 173 addSource('/testA.dart', 'String T1; var _T2;');
167 addTestSource('import "/testA.dart"; class C {foo(){^}}'); 174 addTestSource('import "/testA.dart"; class C {foo(){^}}');
168 return computeFull().then((_) { 175 return computeFull().then((_) {
169 assertSuggestTopLevelVar('T1', 'String'); 176 assertSuggestTopLevelVar('T1', 'String');
170 assertNotSuggested('_T2'); 177 assertNotSuggested('_T2');
171 }); 178 });
172 } 179 }
173 180
174 test_topLevelVar_name() { 181 test_topLevelVar_name() {
(...skipping 14 matching lines...) Expand all
189 196
190 test_topLevelVar_notImported() { 197 test_topLevelVar_notImported() {
191 addSource('/testA.dart', 'var T1; var _T2;'); 198 addSource('/testA.dart', 'var T1; var _T2;');
192 addTestSource('class C {foo(){^}}'); 199 addTestSource('class C {foo(){^}}');
193 return computeFull(true).then((_) { 200 return computeFull(true).then((_) {
194 assertSuggestTopLevelVar('T1', null, CompletionRelevance.LOW); 201 assertSuggestTopLevelVar('T1', null, CompletionRelevance.LOW);
195 assertNotSuggested('_T2'); 202 assertNotSuggested('_T2');
196 }); 203 });
197 } 204 }
198 } 205 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/imported_computer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698