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

Unified Diff: pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart

Issue 1369033002: Completions with exact prefix should be prioritized - fixes #23099 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/test/services/completion/completion_test_util.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
index cb29f9782f8b7bc06454e9b3d3d8e53fc80b2e20..94c07173d7e315ad49524be6c37911331580887a 100644
--- a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
@@ -793,6 +793,20 @@ class B extends A {m() {^}}
assertSuggestMethod('m', 'B', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
}
+ test_prioritization_private() {
+ addTestSource('main() {var ab; var _ab; _^}');
+ expect(computeFast(), isTrue);
+ assertSuggestLocalVariable('ab', null);
+ assertSuggestLocalVariable('_ab', null);
+ }
+
+ test_prioritization_public() {
+ addTestSource('main() {var ab; var _ab; a^}');
+ expect(computeFast(), isTrue);
+ assertSuggestLocalVariable('ab', null);
+ assertSuggestLocalVariable('_ab', null, relevance: DART_RELEVANCE_DEFAULT);
+ }
+
test_shadowed_name() {
addTestSource('var a; class A { var a; m() { ^ } }');
expect(computeFast(), isTrue);
« no previous file with comments | « pkg/analysis_server/test/services/completion/completion_test_util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698