| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |