| Index: pkg/analysis_services/test/completion/completion_test_util.dart
|
| diff --git a/pkg/analysis_services/test/completion/top_level_computer_test.dart b/pkg/analysis_services/test/completion/completion_test_util.dart
|
| similarity index 76%
|
| copy from pkg/analysis_services/test/completion/top_level_computer_test.dart
|
| copy to pkg/analysis_services/test/completion/completion_test_util.dart
|
| index 113f5fd3c994e6e40febd91f18965d0529337118..c0690502a5b4040fea5dffeae61cdde908b75ecc 100644
|
| --- a/pkg/analysis_services/test/completion/top_level_computer_test.dart
|
| +++ b/pkg/analysis_services/test/completion/completion_test_util.dart
|
| @@ -2,38 +2,24 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -library test.services.completion.toplevel;
|
| +library test.services.completion.util;
|
|
|
| +import 'dart:async';
|
| +
|
| +import 'package:analysis_services/completion/completion_computer.dart';
|
| import 'package:analysis_services/completion/completion_suggestion.dart';
|
| -import 'package:analysis_services/completion/top_level_computer.dart';
|
| import 'package:analysis_services/index/index.dart';
|
| import 'package:analysis_services/index/local_memory_index.dart';
|
| import 'package:analysis_services/src/search/search_engine.dart';
|
| import 'package:analysis_testing/abstract_single_unit.dart';
|
| -import 'package:analysis_testing/reflective_tests.dart';
|
| import 'package:unittest/unittest.dart';
|
| -import 'dart:async';
|
| -
|
| -main() {
|
| - groupSep = ' | ';
|
| - runReflectiveTests(TopLevelComputerTest);
|
| -}
|
|
|
| -@ReflectiveTestCase()
|
| -class TopLevelComputerTest extends AbstractSingleUnitTest {
|
| +class AbstractCompletionTest extends AbstractSingleUnitTest {
|
| Index index;
|
| SearchEngineImpl searchEngine;
|
| - TopLevelComputer computer;
|
| + CompletionComputer computer;
|
| List<CompletionSuggestion> suggestions;
|
|
|
| - test_class() {
|
| - addTestUnit('class B {boolean v;}');
|
| - return compute().then((_) {
|
| - assertHasResult(CompletionSuggestionKind.CLASS, 'B');
|
| - assertNoResult('v');
|
| - });
|
| - }
|
| -
|
| void addTestUnit(String code) {
|
| resolveTestUnit(code);
|
| index.indexUnit(context, testUnit);
|
| @@ -71,7 +57,6 @@ class TopLevelComputerTest extends AbstractSingleUnitTest {
|
| super.setUp();
|
| index = createLocalMemoryIndex();
|
| searchEngine = new SearchEngineImpl(index);
|
| - computer = new TopLevelComputer(searchEngine);
|
| verifyNoTestUnitErrors = false;
|
| }
|
| }
|
|
|