| Index: pkg/analysis_services/test/completion/local_computer_test.dart
|
| diff --git a/pkg/analysis_services/test/completion/local_computer_test.dart b/pkg/analysis_services/test/completion/local_computer_test.dart
|
| index deb81346271b9bd558a00e9edcddcf095616c244..dc666bd6b39e33c1550bd10b11a827f80a26d977 100644
|
| --- a/pkg/analysis_services/test/completion/local_computer_test.dart
|
| +++ b/pkg/analysis_services/test/completion/local_computer_test.dart
|
| @@ -25,10 +25,11 @@ class LocalComputerTest extends AbstractCompletionTest {
|
| }
|
|
|
| test_block() {
|
| - addTestSource('class A {a() {var f; ^ var g;}}');
|
| + addTestSource('class A {a() {var f; {var x;} ^ var g;}}');
|
| expect(computeFast(), isTrue);
|
| assertSuggestVariable('f');
|
| assertNotSuggested('g');
|
| + assertNotSuggested('x');
|
| }
|
|
|
| test_catch() {
|
| @@ -100,4 +101,12 @@ class LocalComputerTest extends AbstractCompletionTest {
|
| assertSuggestParameter('x');
|
| assertSuggestParameter('y');
|
| }
|
| -}
|
| +
|
| + test_variableDeclaration() {
|
| + addTestSource('main() {int a = 1, b = 2 + ^;}');
|
| + expect(computeFast(), isTrue);
|
| + assertSuggestVariable('a');
|
| + assertNotSuggested('b');
|
| + }
|
| +}
|
| +
|
|
|