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

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

Issue 1267203002: add location to suggestions from local file (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/imported_reference_contributor_test.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 e46a7717c7cecf2e5b2b77d66f40ea9517a5e2bc..36310dabb3c07994f9d6bb41d3e16b71d10c43c6 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
@@ -24,9 +24,14 @@ class LocalReferenceContributorTest extends AbstractSelectorSuggestionTest {
@override
CompletionSuggestion assertSuggestLocalClass(String name,
{CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
- int relevance: DART_RELEVANCE_DEFAULT, bool isDeprecated: false}) {
+ int relevance: DART_RELEVANCE_DEFAULT, bool isDeprecated: false,
+ String elemFile, int elemOffset}) {
return assertSuggestClass(name,
- kind: kind, relevance: relevance, isDeprecated: isDeprecated);
+ elemFile: elemFile,
+ elemOffset: elemOffset,
+ isDeprecated: isDeprecated,
+ kind: kind,
+ relevance: relevance);
}
@override
@@ -36,8 +41,9 @@ class LocalReferenceContributorTest extends AbstractSelectorSuggestionTest {
}
@override
- CompletionSuggestion assertSuggestLocalConstructor(String name) {
- return assertSuggestConstructor(name);
+ CompletionSuggestion assertSuggestLocalConstructor(String name,
+ {int elemOffset}) {
+ return assertSuggestConstructor(name, elemOffset: elemOffset);
}
@override
@@ -602,7 +608,7 @@ main() {new ^ String x = "hello";}''');
return computeFull((bool result) {
CompletionSuggestion suggestion;
- suggestion = assertSuggestLocalConstructor('A');
+ suggestion = assertSuggestLocalConstructor('A', elemOffset: -1);
expect(suggestion.element.parameters, '()');
expect(suggestion.element.returnType, 'A');
expect(suggestion.declaringType, 'A');
« no previous file with comments | « pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698