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

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

Issue 791553007: suggest fields rather than synthetic getters (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 11 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.dart.local; 5 library test.services.completion.dart.local;
6 6
7 import 'package:analysis_server/src/protocol_server.dart';
8 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
7 import 'package:analysis_server/src/services/completion/local_computer.dart'; 9 import 'package:analysis_server/src/services/completion/local_computer.dart';
8 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
9 11
10 import '../../reflective_tests.dart'; 12 import '../../reflective_tests.dart';
11 import 'completion_test_util.dart'; 13 import 'completion_test_util.dart';
12 14
13 main() { 15 main() {
14 groupSep = ' | '; 16 groupSep = ' | ';
15 runReflectiveTests(LocalComputerTest); 17 runReflectiveTests(LocalComputerTest);
16 } 18 }
17 19
18 @ReflectiveTestCase() 20 @ReflectiveTestCase()
19 class LocalComputerTest extends AbstractSelectorSuggestionTest { 21 class LocalComputerTest extends AbstractSelectorSuggestionTest {
20 22
21 @override 23 @override
24 CompletionSuggestion assertSuggestLocalField(String name, String type,
25 [int relevance = COMPLETION_RELEVANCE_DEFAULT]) {
26 return assertSuggestField(name, type, relevance: relevance);
27 }
28
29 @override
22 void setUpComputer() { 30 void setUpComputer() {
23 computer = new LocalComputer(); 31 computer = new LocalComputer();
24 } 32 }
25 33
26 test_break_ignores_outer_functions_using_closure() { 34 test_break_ignores_outer_functions_using_closure() {
27 addTestSource(''' 35 addTestSource('''
28 void main() { 36 void main() {
29 foo: while (true) { 37 foo: while (true) {
30 var f = () { 38 var f = () {
31 bar: while (true) { break ^ } 39 bar: while (true) { break ^ }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 continue ^ 163 continue ^
156 } 164 }
157 } 165 }
158 } 166 }
159 '''); 167 ''');
160 expect(computeFast(), isTrue); 168 expect(computeFast(), isTrue);
161 assertSuggestLabel('foo'); 169 assertSuggestLabel('foo');
162 assertSuggestLabel('bar'); 170 assertSuggestLabel('bar');
163 } 171 }
164 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698