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

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

Issue 1128833003: check for package lib exist before making package suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 7 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/import_uri_contributor.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/import_uri_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/import_uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/import_uri_contributor_test.dart
index bfea35a320035cde248f873f67764c77825d25b8..e584c4d48c6c28aa7ee1e554703a19265b1da690 100644
--- a/pkg/analysis_server/test/services/completion/import_uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/import_uri_contributor_test.dart
@@ -164,6 +164,18 @@ class ImportUriContributorTest extends AbstractCompletionTest {
csKind: CompletionSuggestionKind.IMPORT);
}
+ test_import_package_missing_lib() {
+ var pkgSrc = addPackageSource('bar', 'bar.dart', 'library bar;');
+ provider.deleteFolder(dirname(pkgSrc.fullName));
+ addTestSource('import "p^" class');
+ computeFast();
+ expect(request.replacementOffset, completionOffset - 1);
+ expect(request.replacementLength, 1);
+ assertSuggest('package:', csKind: CompletionSuggestionKind.IMPORT);
+ assertSuggest('package:bar/', csKind: CompletionSuggestionKind.IMPORT);
+ assertNotSuggested('package:bar/bar.dart');
+ }
+
test_outside_import() {
addTestSource('import ^"d" import');
computeFast();
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/import_uri_contributor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698