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

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

Issue 1064743002: do not suggest elements from internal sdk libs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 5 years, 8 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/mock_sdk.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/imported_reference_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
index e4e807abb5a42d929bbbd500c1566e27431ad2df..75519795056f8aecd471fa2188ba656687af1825 100644
--- a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
@@ -175,7 +175,8 @@ class ImportedReferenceContributorTest extends AbstractSelectorSuggestionTest {
@override
void setUpContributor() {
- contributor = new ImportedReferenceContributor(shouldWaitForLowPrioritySuggestions: true);
+ contributor = new ImportedReferenceContributor(
+ shouldWaitForLowPrioritySuggestions: true);
}
@override
@@ -225,6 +226,17 @@ class ImportedReferenceContributorTest extends AbstractSelectorSuggestionTest {
});
}
+ test_internal_sdk_libs() {
+ addTestSource('main() {p^}');
+ computeFast();
+ return computeFull((bool result) {
+ assertSuggest('print');
+ assertSuggest('pow', relevance: DART_RELEVANCE_LOW);
+ // Do not suggest completions from internal SDK library
+ assertNotSuggested('printToConsole');
+ });
+ }
+
test_Block_partial_results() {
// Block BlockFunctionBody MethodDeclaration
addSource('/testAB.dart', '''
@@ -255,7 +267,8 @@ class ImportedReferenceContributorTest extends AbstractSelectorSuggestionTest {
Z D2() {int x;}
class X {a() {var f; {var x;} ^ var r;} void b() { }}
class Z { }''');
- (contributor as ImportedReferenceContributor).shouldWaitForLowPrioritySuggestions = false;
+ ImportedReferenceContributor contributor = this.contributor;
+ contributor.shouldWaitForLowPrioritySuggestions = false;
computeFast();
return computeFull((bool result) {
assertSuggestImportedClass('C');
« no previous file with comments | « pkg/analysis_server/test/mock_sdk.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698