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

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

Issue 1516883002: do not suggest completions for cascade on library prefix - fixes #25215 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years 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
Index: pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
index 1f6b66e699a361ede5cb517fb8991c90367b1ce5..ac38fa6b4e25999e0415c3d798904c8a0cbd2f85 100644
--- a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
@@ -32,6 +32,38 @@ class LibraryMemberContributorTest extends DartCompletionContributorTest {
assertNotSuggested('loadLibrary');
}
+ test_libraryPrefix_cascade() async {
+ addTestSource('''
+ import "dart:math" as math;
+ main() {math..^}''');
+ await computeSuggestions();
+ assertNoSuggestions();
+ }
+
+ test_libraryPrefix_cascade2() async {
+ addTestSource('''
+ import "dart:math" as math;
+ main() {math.^.}''');
+ await computeSuggestions();
+ assertSuggestFunction('min', 'num');
+ }
+
+ test_libraryPrefix_cascade3() async {
+ addTestSource('''
+ import "dart:math" as math;
+ main() {math..^a}''');
+ await computeSuggestions();
+ assertNoSuggestions();
+ }
+
+ test_libraryPrefix_cascade4() async {
+ addTestSource('''
+ import "dart:math" as math;
+ main() {math.^.a}''');
+ await computeSuggestions();
+ assertSuggestFunction('min', 'num');
+ }
+
test_libraryPrefix2() async {
// SimpleIdentifier MethodInvocation ExpressionStatement
addTestSource('import "dart:async" as bar; foo() {bar.^ print("f")}');

Powered by Google App Engine
This is Rietveld 408576698