| Index: pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
|
| index 5740cadb2eca9c7ab5af76157a71f7d536eda409..8cbed55e7f9c835e9c50e44446f842ba07dd1477 100644
|
| --- a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
|
| @@ -4043,6 +4043,21 @@ class X {foo(){A^.bar}}''');
|
| assertNotSuggested('String');
|
| }
|
|
|
| + test_SwitchStatement_case_var() async {
|
| + // SwitchStatement Block BlockFunctionBody MethodDeclaration
|
| + addTestSource('g(int x) {var t; switch(x) {case 0: var bar; b^}}');
|
| + await computeSuggestions();
|
| +
|
| + assertSuggestFunction('g', 'dynamic',
|
| + relevance: DART_RELEVANCE_LOCAL_FUNCTION);
|
| + assertSuggestLocalVariable('t', 'dynamic',
|
| + relevance: DART_RELEVANCE_LOCAL_VARIABLE);
|
| + assertSuggestParameter('x', 'int', relevance: DART_RELEVANCE_PARAMETER);
|
| + assertSuggestLocalVariable('bar', 'dynamic',
|
| + relevance: DART_RELEVANCE_LOCAL_VARIABLE);
|
| + assertNotSuggested('String');
|
| + }
|
| +
|
| test_SwitchStatement_empty() async {
|
| // SwitchStatement Block BlockFunctionBody MethodDeclaration
|
| addTestSource('class A {String g(int x) {switch(x) {^}}}');
|
|
|