| 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.dart.local; | 5 library test.services.completion.dart.local; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/protocol_server.dart'; | 7 import 'package:analysis_server/src/protocol_server.dart'; |
| 8 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 8 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| 9 import 'package:analysis_server/src/services/completion/local_computer.dart'; | 9 import 'package:analysis_server/src/services/completion/local_computer.dart'; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 CompletionSuggestion suggestion = | 726 CompletionSuggestion suggestion = |
| 727 assertSuggestLocalMethod('m', 'A', 'void'); | 727 assertSuggestLocalMethod('m', 'A', 'void'); |
| 728 expect(suggestion.parameterNames, hasLength(2)); | 728 expect(suggestion.parameterNames, hasLength(2)); |
| 729 expect(suggestion.parameterNames[0], 'x'); | 729 expect(suggestion.parameterNames[0], 'x'); |
| 730 expect(suggestion.parameterTypes[0], 'dynamic'); | 730 expect(suggestion.parameterTypes[0], 'dynamic'); |
| 731 expect(suggestion.parameterNames[1], 'y'); | 731 expect(suggestion.parameterNames[1], 'y'); |
| 732 expect(suggestion.parameterTypes[1], 'int'); | 732 expect(suggestion.parameterTypes[1], 'int'); |
| 733 expect(suggestion.requiredParameterCount, 2); | 733 expect(suggestion.requiredParameterCount, 2); |
| 734 expect(suggestion.hasNamedParameters, false); | 734 expect(suggestion.hasNamedParameters, false); |
| 735 } | 735 } |
| 736 |
| 737 test_shadowed_name() { |
| 738 addTestSource('var a; class A { var a; m() { ^ } }'); |
| 739 expect(computeFast(), isTrue); |
| 740 assertSuggestLocalField('a', null); |
| 741 } |
| 736 } | 742 } |
| OLD | NEW |