| Index: pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
|
| index 561d877031c37aab398978685b2b8d4307fecd0e..c33ec146443b169ac4ef0da50b0988a7786dcc35 100644
|
| --- a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
|
| @@ -4,6 +4,7 @@
|
|
|
| library test.services.completion.toplevel;
|
|
|
| +import 'package:analysis_server/src/analysis_server.dart';
|
| import 'package:analysis_server/src/protocol.dart' as protocol
|
| show Element, ElementKind;
|
| import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind;
|
| @@ -18,9 +19,8 @@ import 'package:test_reflective_loader/test_reflective_loader.dart';
|
| import 'package:unittest/unittest.dart';
|
|
|
| import '../../abstract_context.dart';
|
| -import 'completion_test_util.dart';
|
| -import 'package:analysis_server/src/analysis_server.dart';
|
| import '../../operation/operation_queue_test.dart';
|
| +import 'completion_test_util.dart';
|
|
|
| main() {
|
| groupSep = ' | ';
|
| @@ -210,6 +210,18 @@ class ImportedReferenceContributorTest extends AbstractSelectorSuggestionTest {
|
| return cs;
|
| }
|
|
|
| + fail_enum_deprecated() {
|
| + addSource('/libA.dart', 'library A; @deprecated enum E { one, two }');
|
| + addTestSource('import "/libA.dart"; main() {^}');
|
| + return computeFull((bool result) {
|
| + // TODO(danrube) investigate why suggestion/element is not deprecated
|
| + // when AST node has correct @deprecated annotation
|
| + assertSuggestEnum('E', isDeprecated: true);
|
| + assertNotSuggested('one');
|
| + assertNotSuggested('two');
|
| + });
|
| + }
|
| +
|
| bool isCached(List<CompletionSuggestion> suggestions, String completion) =>
|
| suggestions.any((CompletionSuggestion s) => s.completion == completion);
|
|
|
| @@ -307,6 +319,16 @@ class ImportedReferenceContributorTest extends AbstractSelectorSuggestionTest {
|
| });
|
| }
|
|
|
| + test_enum() {
|
| + addSource('/libA.dart', 'library A; enum E { one, two }');
|
| + addTestSource('import "/libA.dart"; main() {^}');
|
| + return computeFull((bool result) {
|
| + assertSuggestEnum('E');
|
| + assertNotSuggested('one');
|
| + assertNotSuggested('two');
|
| + });
|
| + }
|
| +
|
| test_function_parameters_mixed_required_and_named() {
|
| addSource('/libA.dart', '''
|
| void m(x, {int y}) {}
|
|
|