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

Unified Diff: pkg/analysis_server/test/domain_completion_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 | « no previous file | pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/domain_completion_test.dart
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index 3435be7040f0698a1a226a3a555d767ae5a45edc..edce0d558bdf13cbaffe7d98a66ef56fa20c2e99 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -512,6 +512,20 @@ class B extends A {m() {^}}
assertNoResult('HtmlElement');
});
}
+
+ test_import_uri_with_trailing() {
+ addFile('/project/bin/testA.dart', 'library libA;');
+ addTestFile('''
+ import '/project/bin/t^.dart';
+ main() {}''');
+ return getSuggestions().then((_) {
+ expect(replacementOffset, equals(completionOffset - 14));
+ expect(replacementLength, equals(5 + 14));
+ assertHasResult(
+ CompletionSuggestionKind.IMPORT, '/project/bin/testA.dart');
+ assertNoResult('test');
+ });
+ }
}
class MockRelevancySorter implements DartContributionSorter {
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698