| Index: pkg/analysis_server/test/domain_completion_test.dart
|
| diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
|
| index 08fa7e6dfe90a88eca031a45888cbd709c45b504..21307d553142c03936547e54218b3fbc7fff7d4f 100644
|
| --- a/pkg/analysis_server/test/domain_completion_test.dart
|
| +++ b/pkg/analysis_server/test/domain_completion_test.dart
|
| @@ -364,46 +364,6 @@ class CompletionTest extends AbstractAnalysisTest {
|
| });
|
| }
|
|
|
| - test_partFile() {
|
| - addFile('/project/bin/testA.dart', '''
|
| - library libA;
|
| - part "$testFile";
|
| - import 'dart:html';
|
| - class A { }
|
| - ''');
|
| - addTestFile('''
|
| - part of libA;
|
| - main() {^}''');
|
| - return getSuggestions().then((_) {
|
| - expect(replacementOffset, equals(completionOffset));
|
| - expect(replacementLength, equals(0));
|
| - assertHasResult(CompletionSuggestionKind.INVOCATION, 'Object');
|
| - assertHasResult(CompletionSuggestionKind.INVOCATION, 'HtmlElement');
|
| - assertHasResult(CompletionSuggestionKind.INVOCATION, 'A');
|
| - assertNoResult('test');
|
| - });
|
| - }
|
| -
|
| - test_partFile2() {
|
| - addFile('/testA.dart', '''
|
| - part of libA;
|
| - class A { }''');
|
| - addTestFile('''
|
| - library libA;
|
| - part "/testA.dart";
|
| - import 'dart:html';
|
| - main() {^}
|
| - ''');
|
| - return getSuggestions().then((_) {
|
| - expect(replacementOffset, equals(completionOffset));
|
| - expect(replacementLength, equals(0));
|
| - assertHasResult(CompletionSuggestionKind.INVOCATION, 'Object');
|
| - assertHasResult(CompletionSuggestionKind.INVOCATION, 'HtmlElement');
|
| - assertHasResult(CompletionSuggestionKind.INVOCATION, 'A');
|
| - assertNoResult('test');
|
| - });
|
| - }
|
| -
|
| test_imports_prefixed() {
|
| addTestFile('''
|
| import 'dart:html' as foo;
|
| @@ -484,6 +444,61 @@ class CompletionTest extends AbstractAnalysisTest {
|
| });
|
| }
|
|
|
| + test_partFile() {
|
| + addFile('/project/bin/testA.dart', '''
|
| + library libA;
|
| + part "$testFile";
|
| + import 'dart:html';
|
| + class A { }
|
| + ''');
|
| + addTestFile('''
|
| + part of libA;
|
| + main() {^}''');
|
| + return getSuggestions().then((_) {
|
| + expect(replacementOffset, equals(completionOffset));
|
| + expect(replacementLength, equals(0));
|
| + assertHasResult(CompletionSuggestionKind.INVOCATION, 'Object');
|
| + assertHasResult(CompletionSuggestionKind.INVOCATION, 'HtmlElement');
|
| + assertHasResult(CompletionSuggestionKind.INVOCATION, 'A');
|
| + assertNoResult('test');
|
| + });
|
| + }
|
| +
|
| + test_partFile2() {
|
| + addFile('/testA.dart', '''
|
| + part of libA;
|
| + class A { }''');
|
| + addTestFile('''
|
| + library libA;
|
| + part "/testA.dart";
|
| + import 'dart:html';
|
| + main() {^}
|
| + ''');
|
| + return getSuggestions().then((_) {
|
| + expect(replacementOffset, equals(completionOffset));
|
| + expect(replacementLength, equals(0));
|
| + assertHasResult(CompletionSuggestionKind.INVOCATION, 'Object');
|
| + assertHasResult(CompletionSuggestionKind.INVOCATION, 'HtmlElement');
|
| + assertHasResult(CompletionSuggestionKind.INVOCATION, 'A');
|
| + assertNoResult('test');
|
| + });
|
| + }
|
| +
|
| + test_simple() {
|
| + addTestFile('''
|
| + void main() {
|
| + ^
|
| + }
|
| + ''');
|
| + return getSuggestions().then((_) {
|
| + expect(replacementOffset, equals(completionOffset));
|
| + expect(replacementLength, equals(0));
|
| + assertHasResult(CompletionSuggestionKind.INVOCATION, 'Object');
|
| + assertNoResult('HtmlElement');
|
| + assertNoResult('test');
|
| + });
|
| + }
|
| +
|
| test_topLevel() {
|
| addTestFile('''
|
| typedef foo();
|
|
|