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

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

Issue 1843513003: tests to assert completion suggestion replacementLength includes entire URI (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 4 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/test/domain_completion_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/dart/uri_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
index f12074436add766d8342c4adbecdb2b2c7efb045..8bd4e6ba4b61e9121e744223c883ccc56ae532f5 100644
--- a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
@@ -258,6 +258,18 @@ class UriContributorTest extends DartCompletionContributorTest {
csKind: CompletionSuggestionKind.IMPORT);
}
+ test_import_package2_with_trailing() async {
+ addPackageSource('foo', 'foo.dart', 'library foo;');
+ addPackageSource('foo', 'baz/too.dart', 'library too;');
+ addPackageSource('bar', 'bar.dart', 'library bar;');
+ addTestSource('import "package:foo/baz/^.dart" import');
+ await computeSuggestions();
+ assertSuggest('package:foo/baz/too.dart',
+ csKind: CompletionSuggestionKind.IMPORT);
+ expect(replacementOffset, completionOffset - 16);
+ expect(replacementLength, 5 + 16);
+ }
+
test_import_package2_raw() async {
addPackageSource('foo', 'foo.dart', 'library foo;');
addPackageSource('foo', 'baz/too.dart', 'library too;');
« no previous file with comments | « pkg/analysis_server/test/domain_completion_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698