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

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

Issue 1038113002: remove invalid completions in method declaration param list (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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
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 9 import 'package:analysis_server/src/protocol.dart' as protocol
10 show Element, ElementKind; 10 show Element, ElementKind;
(...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 test_FormalParameterList() { 2053 test_FormalParameterList() {
2054 // FormalParameterList MethodDeclaration 2054 // FormalParameterList MethodDeclaration
2055 addTestSource(''' 2055 addTestSource('''
2056 foo() { } 2056 foo() { }
2057 void bar() { } 2057 void bar() { }
2058 class A {a(^) { }}'''); 2058 class A {a(^) { }}''');
2059 computeFast(); 2059 computeFast();
2060 return computeFull((bool result) { 2060 return computeFull((bool result) {
2061 expect(request.replacementOffset, completionOffset); 2061 expect(request.replacementOffset, completionOffset);
2062 expect(request.replacementLength, 0); 2062 expect(request.replacementLength, 0);
2063 assertSuggestLocalFunction('foo', null); 2063 assertNotSuggested('foo');
2064 assertSuggestLocalMethod('a', 'A', null); 2064 assertNotSuggested('a');
2065 assertSuggestLocalClass('A'); 2065 assertSuggestLocalClass('A');
2066 assertSuggestImportedClass('String'); 2066 assertSuggestImportedClass('String');
2067 assertSuggestImportedFunction('identical', 'bool'); 2067 assertNotSuggested('identical');
2068 assertNotSuggested('bar'); 2068 assertNotSuggested('bar');
2069 }); 2069 });
2070 } 2070 }
2071 2071
2072 test_ForStatement_body() { 2072 test_ForStatement_body() {
2073 // Block ForStatement 2073 // Block ForStatement
2074 addTestSource('main(args) {for (int i; i < 10; ++i) {^}}'); 2074 addTestSource('main(args) {for (int i; i < 10; ++i) {^}}');
2075 computeFast(); 2075 computeFast();
2076 return computeFull((bool result) { 2076 return computeFull((bool result) {
2077 expect(request.replacementOffset, completionOffset); 2077 expect(request.replacementOffset, completionOffset);
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
3682 assertNotSuggested('bar2'); 3682 assertNotSuggested('bar2');
3683 assertNotSuggested('_B'); 3683 assertNotSuggested('_B');
3684 assertSuggestLocalClass('Y'); 3684 assertSuggestLocalClass('Y');
3685 assertSuggestLocalClass('C'); 3685 assertSuggestLocalClass('C');
3686 assertSuggestLocalVariable('f', null); 3686 assertSuggestLocalVariable('f', null);
3687 assertNotSuggested('x'); 3687 assertNotSuggested('x');
3688 assertNotSuggested('e'); 3688 assertNotSuggested('e');
3689 }); 3689 });
3690 } 3690 }
3691 } 3691 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698