Index: pkg/analysis_server/test/services/completion/keyword_contributor_test.dart |
diff --git a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart |
index 55cf65959098d80d04de50ba39721ed3c8dc0978..b38c461448539606a194a14c0faee7d28a057206 100644 |
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart |
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart |
@@ -646,6 +646,30 @@ class A { |
assertSuggestKeywords(STMT_START_OUTSIDE_CLASS, pseudoKeywords: ['await']); |
} |
+ test_if_expression_in_class() { |
+ addTestSource('class A {foo() {if (^) }}'); |
+ expect(computeFast(), isTrue); |
+ assertSuggestKeywords(EXPRESSION_START_INSTANCE); |
+ } |
+ |
+ test_if_expression_in_class2() { |
+ addTestSource('class A {foo() {if (n^) }}'); |
+ expect(computeFast(), isTrue); |
+ assertSuggestKeywords(EXPRESSION_START_INSTANCE); |
+ } |
+ |
+ test_if_expression_in_function() { |
+ addTestSource('foo() {if (^) }'); |
+ expect(computeFast(), isTrue); |
+ assertSuggestKeywords(EXPRESSION_START_NO_INSTANCE); |
+ } |
+ |
+ test_if_expression_in_function2() { |
+ addTestSource('foo() {if (n^) }'); |
+ expect(computeFast(), isTrue); |
+ assertSuggestKeywords(EXPRESSION_START_NO_INSTANCE); |
+ } |
+ |
test_if_in_class() { |
addTestSource('class A {foo() {if (true) ^}}'); |
expect(computeFast(), isTrue); |