mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:09:48 +00:00
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:
parent
63c8bb7e46
commit
9e2d9ecd92
|
@ -367,8 +367,25 @@ void main() {
|
||||||
completion: 'v',
|
completion: 'v',
|
||||||
element: ElementKind.TOP_LEVEL_VARIABLE,
|
element: ElementKind.TOP_LEVEL_VARIABLE,
|
||||||
kind: CompletionSuggestionKind.INVOCATION);
|
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
|
@failingTest
|
||||||
|
@ -394,6 +411,25 @@ void main() {
|
||||||
kind: CompletionSuggestionKind.INVOCATION);
|
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 {
|
Future<void> test_sdk_lib_future_isNotDuplicated() async {
|
||||||
await addTestFile('''
|
await addTestFile('''
|
||||||
void main() {
|
void main() {
|
||||||
|
|
Loading…
Reference in a new issue