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

Side by Side Diff: pkg/analysis_server/test/services/completion/invocation_computer_test.dart

Issue 1060713005: rename completion computer to contributor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.invocation; 5 library test.services.completion.invocation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 10 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
11 import 'package:analysis_server/src/services/completion/invocation_computer.dart '; 11 import 'package:analysis_server/src/services/completion/invocation_computer.dart ';
12 import 'package:unittest/unittest.dart'; 12 import 'package:unittest/unittest.dart';
13 13
14 import '../../reflective_tests.dart'; 14 import '../../reflective_tests.dart';
15 import 'completion_test_util.dart'; 15 import 'completion_test_util.dart';
16 16
17 main() { 17 main() {
18 groupSep = ' | '; 18 groupSep = ' | ';
19 runReflectiveTests(InvocationComputerTest); 19 runReflectiveTests(PrefixedElementContributorTest);
20 } 20 }
21 21
22 @reflectiveTest 22 @reflectiveTest
23 class InvocationComputerTest extends AbstractSelectorSuggestionTest { 23 class PrefixedElementContributorTest extends AbstractSelectorSuggestionTest {
24 @override 24 @override
25 CompletionSuggestion assertSuggestInvocationField(String name, String type, 25 CompletionSuggestion assertSuggestInvocationField(String name, String type,
26 {int relevance: DART_RELEVANCE_DEFAULT, bool isDeprecated: false}) { 26 {int relevance: DART_RELEVANCE_DEFAULT, bool isDeprecated: false}) {
27 return assertSuggestField(name, type, 27 return assertSuggestField(name, type,
28 relevance: relevance, isDeprecated: isDeprecated); 28 relevance: relevance, isDeprecated: isDeprecated);
29 } 29 }
30 30
31 /** 31 /**
32 * Check whether a declaration of the form [shadower] in a derived class 32 * Check whether a declaration of the form [shadower] in a derived class
33 * shadows a declaration of the form [shadowee] in a base class, for the 33 * shadows a declaration of the form [shadowee] in a base class, for the
(...skipping 29 matching lines...) Expand all
63 fail_test_PrefixedIdentifier_trailingStmt_const_untyped() { 63 fail_test_PrefixedIdentifier_trailingStmt_const_untyped() {
64 // SimpleIdentifier PrefixedIdentifier ExpressionStatement 64 // SimpleIdentifier PrefixedIdentifier ExpressionStatement
65 addTestSource('const g = "hello"; f() {g.^ int y = 0;}'); 65 addTestSource('const g = "hello"; f() {g.^ int y = 0;}');
66 computeFast(); 66 computeFast();
67 return computeFull((bool result) { 67 return computeFull((bool result) {
68 assertSuggestInvocationGetter('length', 'int'); 68 assertSuggestInvocationGetter('length', 'int');
69 }); 69 });
70 } 70 }
71 71
72 @override 72 @override
73 void setUpComputer() { 73 void setUpContributor() {
74 computer = new InvocationComputer(); 74 contributor = new PrefixedElementContributor();
75 } 75 }
76 76
77 test_generic_field() { 77 test_generic_field() {
78 addTestSource(''' 78 addTestSource('''
79 class C<T> { 79 class C<T> {
80 T t; 80 T t;
81 } 81 }
82 void f(C<int> c) { 82 void f(C<int> c) {
83 c.^ 83 c.^
84 } 84 }
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 507 }
508 void test(Derived d) { 508 void test(Derived d) {
509 d.^ 509 d.^
510 } 510 }
511 '''); 511 ''');
512 return computeFull((bool result) { 512 return computeFull((bool result) {
513 assertSuggestMethod('f', 'Base', 'void'); 513 assertSuggestMethod('f', 'Base', 'void');
514 }); 514 });
515 } 515 }
516 } 516 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698