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

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

Issue 966773003: test for interpolation completions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « no previous file | 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.util; 5 library test.services.completion.util;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart' as protocol show Element, 9 import 'package:analysis_server/src/protocol.dart' as protocol show Element,
10 ElementKind; 10 ElementKind;
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 return computeFull((bool result) { 2208 return computeFull((bool result) {
2209 expect(request.replacementOffset, completionOffset); 2209 expect(request.replacementOffset, completionOffset);
2210 expect(request.replacementLength, 0); 2210 expect(request.replacementLength, 0);
2211 assertSuggestInvocationGetter('length', 'int'); 2211 assertSuggestInvocationGetter('length', 'int');
2212 assertNotSuggested('name'); 2212 assertNotSuggested('name');
2213 assertNotSuggested('Object'); 2213 assertNotSuggested('Object');
2214 assertNotSuggested('=='); 2214 assertNotSuggested('==');
2215 }); 2215 });
2216 } 2216 }
2217 2217
2218 test_InterpolationExpression_prefix_selector2() {
2219 // SimpleIdentifier PrefixedIdentifier InterpolationExpression
2220 addTestSource('main() {String name; print("hello \$name.^");}');
2221 computeFast();
2222 return computeFull((bool result) {
2223 assertNoSuggestions();
2224 });
2225 }
2226
2218 test_InterpolationExpression_prefix_target() { 2227 test_InterpolationExpression_prefix_target() {
2219 // SimpleIdentifier PrefixedIdentifier InterpolationExpression 2228 // SimpleIdentifier PrefixedIdentifier InterpolationExpression
2220 addTestSource('main() {String name; print("hello \${nam^e.length}");}'); 2229 addTestSource('main() {String name; print("hello \${nam^e.length}");}');
2221 computeFast(); 2230 computeFast();
2222 return computeFull((bool result) { 2231 return computeFull((bool result) {
2223 assertSuggestLocalVariable('name', 'String'); 2232 assertSuggestLocalVariable('name', 'String');
2224 // top level results are partially filtered 2233 // top level results are partially filtered
2225 //assertSuggestImportedClass('Object'); 2234 //assertSuggestImportedClass('Object');
2226 assertNotSuggested('length'); 2235 assertNotSuggested('length');
2227 }); 2236 });
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
2991 assertNotSuggested('bar2'); 3000 assertNotSuggested('bar2');
2992 assertNotSuggested('_B'); 3001 assertNotSuggested('_B');
2993 assertSuggestLocalClass('Y'); 3002 assertSuggestLocalClass('Y');
2994 assertSuggestLocalClass('C'); 3003 assertSuggestLocalClass('C');
2995 assertSuggestLocalVariable('f', null); 3004 assertSuggestLocalVariable('f', null);
2996 assertNotSuggested('x'); 3005 assertNotSuggested('x');
2997 assertNotSuggested('e'); 3006 assertNotSuggested('e');
2998 }); 3007 });
2999 } 3008 }
3000 } 3009 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698