| 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.invocation; | 5 library test.services.completion.invocation; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol.dart'; | 9 import 'package:analysis_server/src/protocol.dart'; |
| 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 '''); | 210 '''); |
| 211 return computeFull((bool result) { | 211 return computeFull((bool result) { |
| 212 // TODO(paulberry): modify assertSuggestSetter so that we can pass 'int' | 212 // TODO(paulberry): modify assertSuggestSetter so that we can pass 'int' |
| 213 // as a parmeter to it, and it will check the appropriate field in | 213 // as a parmeter to it, and it will check the appropriate field in |
| 214 // the suggestion object. | 214 // the suggestion object. |
| 215 CompletionSuggestion suggestion = assertSuggestSetter('t'); | 215 CompletionSuggestion suggestion = assertSuggestSetter('t'); |
| 216 expect(suggestion.element.parameters, '(int value)'); | 216 expect(suggestion.element.parameters, '(int value)'); |
| 217 }); | 217 }); |
| 218 } | 218 } |
| 219 | 219 |
| 220 test_keyword() { |
| 221 addTestSource('class C { static C get instance => null; } main() {C.in^}'); |
| 222 return computeFull((bool result) { |
| 223 assertSuggestGetter('instance', 'C'); |
| 224 }); |
| 225 } |
| 226 |
| 220 test_libraryPrefix() { | 227 test_libraryPrefix() { |
| 221 // SimpleIdentifier PrefixedIdentifier ExpressionStatement | 228 // SimpleIdentifier PrefixedIdentifier ExpressionStatement |
| 222 addTestSource('import "dart:async" as bar; foo() {bar.^}'); | 229 addTestSource('import "dart:async" as bar; foo() {bar.^}'); |
| 223 return computeFull((bool result) { | 230 return computeFull((bool result) { |
| 224 assertSuggestClass('Future'); | 231 assertSuggestClass('Future'); |
| 225 assertNotSuggested('loadLibrary'); | 232 assertNotSuggested('loadLibrary'); |
| 226 }); | 233 }); |
| 227 } | 234 } |
| 228 | 235 |
| 229 test_libraryPrefix2() { | 236 test_libraryPrefix2() { |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 assertNotSuggested('ms2'); | 657 assertNotSuggested('ms2'); |
| 651 assertSuggestInvocationMethod('m', 'C2', null, | 658 assertSuggestInvocationMethod('m', 'C2', null, |
| 652 relevance: DART_RELEVANCE_HIGH); | 659 relevance: DART_RELEVANCE_HIGH); |
| 653 assertNotSuggested('fi3'); | 660 assertNotSuggested('fi3'); |
| 654 assertNotSuggested('fs3'); | 661 assertNotSuggested('fs3'); |
| 655 assertNotSuggested('mi3'); | 662 assertNotSuggested('mi3'); |
| 656 assertNotSuggested('ms3'); | 663 assertNotSuggested('ms3'); |
| 657 }); | 664 }); |
| 658 } | 665 } |
| 659 } | 666 } |
| OLD | NEW |