tests for missing getter/setter available suggestions

See: https://github.com/dart-lang/sdk/issues/40626

Change-Id: I3e35b5d7bf849c1afd20b5bd512b7e8b201e2200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135783
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
pq 2020-02-13 22:46:39 +00:00 committed by commit-bot@chromium.org
parent 63c8bb7e46
commit 9e2d9ecd92

View file

@ -367,8 +367,25 @@ void main() {
completion: 'v',
element: ElementKind.TOP_LEVEL_VARIABLE,
kind: CompletionSuggestionKind.INVOCATION);
}
// todo (pq): getters/setters?
/// See: https://github.com/dart-lang/sdk/issues/40626
@failingTest
Future<void> test_project_lib_getters() async {
await addProjectFile('lib/a.dart', r'''
int get g => 0;
''');
await addTestFile('''
void main() {
^
}
''');
expectSuggestion(
completion: 's',
element: ElementKind.SETTER,
kind: CompletionSuggestionKind.INVOCATION);
}
@failingTest
@ -394,6 +411,25 @@ void main() {
kind: CompletionSuggestionKind.INVOCATION);
}
/// See: https://github.com/dart-lang/sdk/issues/40626
@failingTest
Future<void> test_project_lib_setters() async {
await addProjectFile('lib/a.dart', r'''
set s(int s) {}
''');
await addTestFile('''
void main() {
^
}
''');
expectSuggestion(
completion: 's',
element: ElementKind.SETTER,
kind: CompletionSuggestionKind.INVOCATION);
}
Future<void> test_sdk_lib_future_isNotDuplicated() async {
await addTestFile('''
void main() {