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

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

Issue 1027693007: exclude identifier being completed from list of suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 9 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/lib/src/services/completion/local_computer.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_computer_test.dart
diff --git a/pkg/analysis_server/test/services/completion/local_computer_test.dart b/pkg/analysis_server/test/services/completion/local_computer_test.dart
index fed9d0fd324c959561a761e7edfc11c83236e251..e0aca465003f1c90b863f396b26ce62fe5834e42 100644
--- a/pkg/analysis_server/test/services/completion/local_computer_test.dart
+++ b/pkg/analysis_server/test/services/completion/local_computer_test.dart
@@ -194,15 +194,6 @@ void main() {
assertNotSuggested('x');
}
- test_overrides() {
- addTestSource('''
-class A {m() {}}
-class B extends A {m() {^}}
-''');
- expect(computeFast(), isTrue);
- assertSuggestMethod('m', 'B', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
- }
-
test_break_ignores_unrelated_statements() {
addTestSource('''
void main() {
@@ -576,6 +567,13 @@ class B extends A {
expect(suggestion.hasNamedParameters, false);
}
+ test_ignore_symbol_being_completed() {
+ addTestSource('class MyClass { } main(MC^) { }');
+ expect(computeFast(), isTrue);
+ assertSuggestLocalClass('MyClass');
+ assertNotSuggested('MC');
+ }
+
test_InstanceCreationExpression() {
addTestSource('''
class A {foo(){var f; {var x;}}}
@@ -743,6 +741,15 @@ class B extends A {
expect(suggestion.hasNamedParameters, false);
}
+ test_overrides() {
+ addTestSource('''
+class A {m() {}}
+class B extends A {m() {^}}
+''');
+ expect(computeFast(), isTrue);
+ assertSuggestMethod('m', 'B', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
+ }
+
test_shadowed_name() {
addTestSource('var a; class A { var a; m() { ^ } }');
expect(computeFast(), isTrue);
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/local_computer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698