| Index: pkg/analysis_services/test/completion/imported_type_computer_test.dart
|
| diff --git a/pkg/analysis_services/test/completion/imported_type_computer_test.dart b/pkg/analysis_services/test/completion/imported_type_computer_test.dart
|
| index a6361f6437402462aadfaeadda001088403e1a3e..9df921fcf05af5ea177c3323ea561a97ccfeab35 100644
|
| --- a/pkg/analysis_services/test/completion/imported_type_computer_test.dart
|
| +++ b/pkg/analysis_services/test/completion/imported_type_computer_test.dart
|
| @@ -130,6 +130,44 @@ class ImportedTypeComputerTest extends AbstractCompletionTest {
|
| });
|
| }
|
|
|
| + test_field_name() {
|
| + addSource('/testA.dart', 'class A { }');
|
| + addTestSource('import "/testA.dart"; class C {A ^}');
|
| + return computeFull().then((_) {
|
| + assertNotSuggested('A');
|
| + });
|
| + }
|
| +
|
| + test_field_name2() {
|
| + addSource('/testA.dart', 'class A { }');
|
| + addTestSource('import "/testA.dart"; class C {var ^}');
|
| + return computeFull().then((_) {
|
| + // TODO (danrubel) should not be suggested
|
| + // but var ^ in this test
|
| + // parses differently than A ^ in test above
|
| + assertSuggestClass('A');
|
| + });
|
| + }
|
| +
|
| + test_local_name() {
|
| + addSource('/testA.dart', 'var T1;');
|
| + addTestSource('import "/testA.dart"; class C {a() {C ^}}');
|
| + return computeFull().then((_) {
|
| + //TODO (danrubel) should not be suggested
|
| + // but C ^ in this test
|
| + // parses differently than var ^ in test below
|
| + assertSuggestTopLevelVar('T1');
|
| + });
|
| + }
|
| +
|
| + test_local_name2() {
|
| + addSource('/testA.dart', 'var T1;');
|
| + addTestSource('import "/testA.dart"; class C {a() {var ^}}');
|
| + return computeFull().then((_) {
|
| + assertNotSuggested('T1');
|
| + });
|
| + }
|
| +
|
| test_topLevelVar() {
|
| addSource('/testA.dart', 'var T1; var _T2;');
|
| addTestSource('import "/testA.dart"; class C {foo(){^}}');
|
| @@ -139,6 +177,25 @@ class ImportedTypeComputerTest extends AbstractCompletionTest {
|
| });
|
| }
|
|
|
| + test_topLevelVar_name() {
|
| + addSource('/testA.dart', 'class B { };');
|
| + addTestSource('import "/testA.dart"; class C {} B ^');
|
| + return computeFull().then((_) {
|
| + assertNotSuggested('B');
|
| + });
|
| + }
|
| +
|
| + test_topLevelVar_name2() {
|
| + addSource('/testA.dart', 'class B { };');
|
| + addTestSource('import "/testA.dart"; class C {} var ^');
|
| + return computeFull().then((_) {
|
| + // TODO (danrubel) should not be suggested
|
| + // but var ^ in this test
|
| + // parses differently than B ^ in test above
|
| + assertSuggestClass('B');
|
| + });
|
| + }
|
| +
|
| test_topLevelVar_notImported() {
|
| addSource('/testA.dart', 'var T1; var _T2;');
|
| addTestSource('class C {foo(){^}}');
|
|
|