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

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

Issue 620293002: refactor library prefix suggestion generation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years, 2 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/test/services/completion/imported_computer_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) 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.dart.local; 5 library test.services.completion.dart.local;
6 6
7 import 'package:analysis_server/src/services/completion/local_computer.dart'; 7 import 'package:analysis_server/src/services/completion/local_computer.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 9
10 import '../../reflective_tests.dart'; 10 import '../../reflective_tests.dart';
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ' class _B {}' // 75 ' class _B {}' //
76 ' A T;'); 76 ' A T;');
77 expect(computeFast(), isTrue); 77 expect(computeFast(), isTrue);
78 var a = assertSuggestClass('A'); 78 var a = assertSuggestClass('A');
79 expect(a.element.isDeprecated, isTrue); 79 expect(a.element.isDeprecated, isTrue);
80 expect(a.element.isPrivate, isFalse); 80 expect(a.element.isPrivate, isFalse);
81 var b = assertSuggestClass('_B'); 81 var b = assertSuggestClass('_B');
82 expect(b.element.isDeprecated, isFalse); 82 expect(b.element.isDeprecated, isFalse);
83 expect(b.element.isPrivate, isTrue); 83 expect(b.element.isPrivate, isTrue);
84 assertSuggestTopLevelVar('T', 'A'); 84 assertSuggestTopLevelVar('T', 'A');
85 assertSuggestLibraryPrefix('x'); 85 // Library prefix suggestion is provided by ImportedComputer
86 assertNotSuggested('x');
86 } 87 }
87 88
88 test_ExpressionStatement_name() { 89 test_ExpressionStatement_name() {
89 // ExpressionStatement Block 90 // ExpressionStatement Block
90 addTestSource('class A {a() {var f; A ^}}'); 91 addTestSource('class A {a() {var f; A ^}}');
91 expect(computeFast(), isTrue); 92 expect(computeFast(), isTrue);
92 assertNotSuggested('A'); 93 assertNotSuggested('A');
93 assertNotSuggested('a'); 94 assertNotSuggested('a');
94 assertNotSuggested('f'); 95 assertNotSuggested('f');
95 } 96 }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 228
228 // VariableDeclaration VariableDeclarationList VariableDeclarationStat ement 229 // VariableDeclaration VariableDeclarationList VariableDeclarationStat ement
229 addTestSource('class A {a() {var f; {var x;} var e = ^ var g;}}'); 230 addTestSource('class A {a() {var f; {var x;} var e = ^ var g;}}');
230 expect(computeFast(), isTrue); 231 expect(computeFast(), isTrue);
231 assertSuggestClass('A'); 232 assertSuggestClass('A');
232 assertSuggestLocalVariable('f', null); 233 assertSuggestLocalVariable('f', null);
233 assertNotSuggested('g'); 234 assertNotSuggested('g');
234 assertNotSuggested('x'); 235 assertNotSuggested('x');
235 } 236 }
236 } 237 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/imported_computer_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698