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

Unified Diff: pkg/analysis_server/test/domain_completion_test.dart

Issue 458073002: rename and improve imported completion computer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 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 | « no previous file | pkg/analysis_services/lib/src/completion/dart_completion_manager.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 f3339b6cfeef6c5e44936b0ef53c2f3cb93c05f9..a88966bca1d0e8a43ddfce13b18579a3a7083c57 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -139,6 +139,21 @@ class CompletionTest extends AbstractAnalysisTest {
});
}
+ test_imports_prefixed() {
+ addTestFile('''
+ import 'dart:html' as foo;
+ main() {^}
+ ''');
+ return getSuggestions().then((_) {
+ expect(replacementOffset, equals(completionOffset));
+ expect(replacementLength, equals(0));
+ assertHasResult(CompletionSuggestionKind.CLASS, 'Object');
+ assertHasResult(CompletionSuggestionKind.LIBRARY_PREFIX, 'foo');
+ assertNoResult('HtmlElement');
+ assertNoResult('test');
+ });
+ }
+
test_locals() {
addTestFile('class A {var a; x() {var b;^}}');
return getSuggestions().then((_) {
« no previous file with comments | « no previous file | pkg/analysis_services/lib/src/completion/dart_completion_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698