Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: pkg/analysis_server/test/services/completion/inherited_computer_test.dart

Issue 1467023002: step toward new completion API (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments and merge Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/services/completion/inherited_computer_test.dart
diff --git a/pkg/analysis_server/test/services/completion/inherited_computer_test.dart b/pkg/analysis_server/test/services/completion/inherited_computer_test.dart
deleted file mode 100644
index a50fa2f8cabac53e8054151104d88de00c2453b4..0000000000000000000000000000000000000000
--- a/pkg/analysis_server/test/services/completion/inherited_computer_test.dart
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// 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.inherited_computer_test;
-
-import 'package:analysis_server/plugin/protocol/protocol.dart';
-import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
-import 'package:analysis_server/src/services/completion/inherited_contributor.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/src/matcher/core_matchers.dart';
-import 'package:unittest/unittest.dart';
-
-import '../../utils.dart';
-import 'completion_test_util.dart';
-
-main() {
- initializeTestEnvironment();
-// defineReflectiveTests(InheritedContributorTest);
-}
-
-@reflectiveTest
-class InheritedContributorTest extends AbstractCompletionTest {
- @override
- void setUpContributor() {
- contributor = new NewCompletionWrapper(new InheritedContributor());
- }
-
- test_fromMultipleSuperclasses() {
- addTestSource(r'''
-class A {
- notSuggested() => null;
- A suggested1(int x) => null;
- B suggested2(String y) => null;
-}
-class B extends A {
- B suggested2(String y) => null;
- C suggested3([String z]) => null;
-}
-class C extends B {
- sugg^
-}
-''');
- computeFast();
- return computeFull((bool result) {
- _assertOverride(
- '@override\n A suggested1(int x) {\n // TODO: implement suggested1\n return null;\n }');
- _assertOverride(
- '''@override\n B suggested2(String y) {\n // TODO: implement suggested2\n return null;\n }''');
- _assertOverride(
- '''@override\n C suggested3([String z]) {\n // TODO: implement suggested3\n return null;\n }''');
- assertNotSuggested(
- '''@override\n notSuggested() {\n // TODO: implement notSuggested\n return null;\n }''');
- });
- }
-
- CompletionSuggestion _assertOverride(String completion) {
- CompletionSuggestion cs = getSuggest(
- completion: completion,
- csKind: CompletionSuggestionKind.IDENTIFIER,
- elemKind: null);
- if (cs == null) {
- failedCompletion('expected $completion', request.suggestions);
- }
- expect(cs.kind, equals(CompletionSuggestionKind.IDENTIFIER));
- expect(cs.relevance, equals(DART_RELEVANCE_HIGH));
- expect(cs.importUri, null);
-// expect(cs.selectionOffset, equals(completion.length));
- expect(cs.selectionLength, equals(0));
- expect(cs.isDeprecated, isFalse);
- expect(cs.isPotential, isFalse);
- expect(cs.element, isNotNull);
- return cs;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698