blob: 44d0f92aa0eeb3d65e5eb4b48c07b2e165672097 [file] [log] [blame]
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer_plugin/protocol/protocol_common.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'completion_relevance.dart';
void main() {
defineReflectiveSuite(() {
defineReflectiveTests(DeprecatedMemberTest);
});
}
@reflectiveTest
class DeprecatedMemberTest extends CompletionRelevanceTest {
Future<void> test_deprecated() async {
await addTestFile('''
class A {
void a1() { }
@deprecated
void a2() { }
}
void main() {
var a = A();
a.^
}
''');
assertOrder([
suggestionWith(
completion: 'a1',
element: ElementKind.METHOD,
kind: CompletionSuggestionKind.INVOCATION),
suggestionWith(
completion: 'a2',
element: ElementKind.METHOD,
kind: CompletionSuggestionKind.INVOCATION),
]);
}
}