OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library test.services.completion.dart.inherited_computer_test; | 5 library test.services.completion.dart.override; |
6 | 6 |
7 import 'package:analysis_server/plugin/protocol/protocol.dart' | 7 import 'package:analysis_server/plugin/protocol/protocol.dart' |
8 hide Element, ElementKind; | 8 hide Element, ElementKind; |
9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
10 import 'package:analysis_server/src/services/completion/dart/inherited_contribut
or.dart'; | 10 import 'package:analysis_server/src/services/completion/dart/override_contributo
r.dart'; |
11 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart' | 11 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart' |
12 hide DartCompletionContributor; | 12 hide DartCompletionContributor; |
13 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 13 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
14 import 'package:unittest/unittest.dart'; | 14 import 'package:unittest/unittest.dart'; |
15 | 15 |
16 import 'completion_contributor_util.dart'; | 16 import 'completion_contributor_util.dart'; |
17 | 17 |
18 main() { | 18 main() { |
19 // Revisit this contributor and these tests | 19 // Revisit this contributor and these tests |
20 // once DartChangeBuilder API has solidified. | 20 // once DartChangeBuilder API has solidified. |
21 // initializeTestEnvironment(); | 21 // initializeTestEnvironment(); |
22 // defineReflectiveTests(InheritedContributorTest); | 22 // defineReflectiveTests(InheritedContributorTest); |
23 } | 23 } |
24 | 24 |
25 @reflectiveTest | 25 @reflectiveTest |
26 class InheritedContributorTest extends DartCompletionContributorTest { | 26 class OverrideContributorTest extends DartCompletionContributorTest { |
27 @override | 27 @override |
28 DartCompletionContributor createContributor() { | 28 DartCompletionContributor createContributor() { |
29 return new InheritedContributor(); | 29 return new OverrideContributor(); |
30 } | 30 } |
31 | 31 |
32 test_fromMultipleSuperclasses() async { | 32 test_fromMultipleSuperclasses() async { |
33 addTestSource(r''' | 33 addTestSource(r''' |
34 class A { | 34 class A { |
35 A suggested1(int x) => null; | 35 A suggested1(int x) => null; |
36 B suggested2(String y) => null; | 36 B suggested2(String y) => null; |
37 } | 37 } |
38 class B extends A { | 38 class B extends A { |
39 B suggested2(String y) => null; | 39 B suggested2(String y) => null; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 expect(cs.relevance, equals(DART_RELEVANCE_HIGH)); | 112 expect(cs.relevance, equals(DART_RELEVANCE_HIGH)); |
113 expect(cs.importUri, null); | 113 expect(cs.importUri, null); |
114 // expect(cs.selectionOffset, equals(completion.length)); | 114 // expect(cs.selectionOffset, equals(completion.length)); |
115 // expect(cs.selectionLength, equals(0)); | 115 // expect(cs.selectionLength, equals(0)); |
116 expect(cs.isDeprecated, isFalse); | 116 expect(cs.isDeprecated, isFalse); |
117 expect(cs.isPotential, isFalse); | 117 expect(cs.isPotential, isFalse); |
118 expect(cs.element, isNotNull); | 118 expect(cs.element, isNotNull); |
119 return cs; | 119 return cs; |
120 } | 120 } |
121 } | 121 } |
OLD | NEW |