| Index: pkg/analysis_server/test/services/completion/keyword_computer_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/keyword_computer_test.dart b/pkg/analysis_server/test/services/completion/keyword_computer_test.dart
|
| index 51610100e63844c5405c7de16658451f4ddc1b5d..20f23bfa477688783b38e4b2fabf72f5c70818c3 100644
|
| --- a/pkg/analysis_server/test/services/completion/keyword_computer_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/keyword_computer_test.dart
|
| @@ -20,6 +20,19 @@ main() {
|
|
|
| @reflectiveTest
|
| class KeywordComputerTest extends AbstractCompletionTest {
|
| + static const List<Keyword> CLASS_BODY_KEYWORDS = const [
|
| + Keyword.CONST,
|
| + Keyword.DYNAMIC,
|
| + Keyword.FACTORY,
|
| + Keyword.FINAL,
|
| + Keyword.GET,
|
| + Keyword.OPERATOR,
|
| + Keyword.SET,
|
| + Keyword.STATIC,
|
| + Keyword.VAR,
|
| + Keyword.VOID
|
| + ];
|
| +
|
| static const List<Keyword> IN_BLOCK_IN_CLASS = const [
|
| Keyword.ASSERT,
|
| Keyword.CASE,
|
| @@ -178,13 +191,37 @@ class KeywordComputerTest extends AbstractCompletionTest {
|
| ], DART_RELEVANCE_HIGH);
|
| }
|
|
|
| - test_class4() {
|
| + test_class() {
|
| addTestSource('class A e^ { }');
|
| expect(computeFast(), isTrue);
|
| assertSuggestKeywords(
|
| [Keyword.EXTENDS, Keyword.IMPLEMENTS], DART_RELEVANCE_HIGH);
|
| }
|
|
|
| + test_class_body() {
|
| + addTestSource('class A {^}');
|
| + expect(computeFast(), isTrue);
|
| + assertSuggestKeywords(CLASS_BODY_KEYWORDS);
|
| + }
|
| +
|
| + test_class_body_beginning() {
|
| + addTestSource('class A {^ var foo;}');
|
| + expect(computeFast(), isTrue);
|
| + assertSuggestKeywords(CLASS_BODY_KEYWORDS);
|
| + }
|
| +
|
| + test_class_body_between() {
|
| + addTestSource('class A {var bar; ^ var foo;}');
|
| + expect(computeFast(), isTrue);
|
| + assertSuggestKeywords(CLASS_BODY_KEYWORDS);
|
| + }
|
| +
|
| + test_class_body_end() {
|
| + addTestSource('class A {var foo; ^}');
|
| + expect(computeFast(), isTrue);
|
| + assertSuggestKeywords(CLASS_BODY_KEYWORDS);
|
| + }
|
| +
|
| test_class_extends() {
|
| addTestSource('class A extends foo ^');
|
| expect(computeFast(), isTrue);
|
| @@ -368,23 +405,6 @@ class A {
|
| assertSuggestKeywords(IN_BLOCK_NOT_IN_CLASS);
|
| }
|
|
|
| - test_in_class() {
|
| - addTestSource('class A {^}');
|
| - expect(computeFast(), isTrue);
|
| - assertSuggestKeywords([
|
| - Keyword.CONST,
|
| - Keyword.DYNAMIC,
|
| - Keyword.FACTORY,
|
| - Keyword.FINAL,
|
| - Keyword.GET,
|
| - Keyword.OPERATOR,
|
| - Keyword.SET,
|
| - Keyword.STATIC,
|
| - Keyword.VAR,
|
| - Keyword.VOID
|
| - ]);
|
| - }
|
| -
|
| test_library() {
|
| addTestSource('library foo;^');
|
| expect(computeFast(), isTrue);
|
|
|