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

Side by Side Diff: pkg/analysis_services/test/completion/local_computer_test.dart

Issue 459853003: remove duplicate suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix suggestion notification processing in test Created 6 years, 4 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
« no previous file with comments | « pkg/analysis_services/test/completion/completion_test_util.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_services/src/completion/local_computer.dart'; 7 import 'package:analysis_services/src/completion/local_computer.dart';
8 import 'package:analysis_testing/reflective_tests.dart'; 8 import 'package:analysis_testing/reflective_tests.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 assertSuggestVariable('i'); 65 assertSuggestVariable('i');
66 } 66 }
67 67
68 test_forEach() { 68 test_forEach() {
69 addTestSource('main(args) {for (foo in bar) {^}}'); 69 addTestSource('main(args) {for (foo in bar) {^}}');
70 expect(computeFast(), isTrue); 70 expect(computeFast(), isTrue);
71 assertSuggestVariable('foo'); 71 assertSuggestVariable('foo');
72 } 72 }
73 73
74 test_function() { 74 test_function() {
75 addTestSource('main(args) {^}'); 75 addTestSource('main(args) {x.then((b) {^});}');
76 expect(computeFast(), isTrue); 76 expect(computeFast(), isTrue);
77 assertSuggestFunction('main'); 77 assertSuggestFunction('main');
78 assertSuggestParameter('args'); 78 assertSuggestParameter('args');
79 assertSuggestParameter('b');
79 } 80 }
80 81
81 test_members() { 82 test_members() {
82 addTestSource('class A {var f; a() {^} var g;}'); 83 addTestSource('class A {var f; a() {^} var g;}');
83 expect(computeFast(), isTrue); 84 expect(computeFast(), isTrue);
84 assertSuggestMethodName('a'); 85 assertSuggestMethodName('a');
85 assertSuggestField('f'); 86 assertSuggestField('f');
86 assertSuggestField('g'); 87 assertSuggestField('g');
87 } 88 }
88 89
(...skipping 14 matching lines...) Expand all
103 } 104 }
104 105
105 test_variableDeclaration() { 106 test_variableDeclaration() {
106 addTestSource('main() {int a = 1, b = 2 + ^;}'); 107 addTestSource('main() {int a = 1, b = 2 + ^;}');
107 expect(computeFast(), isTrue); 108 expect(computeFast(), isTrue);
108 assertSuggestVariable('a'); 109 assertSuggestVariable('a');
109 assertNotSuggested('b'); 110 assertNotSuggested('b');
110 } 111 }
111 } 112 }
112 113
OLDNEW
« no previous file with comments | « pkg/analysis_services/test/completion/completion_test_util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698