| 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 show Element, | 9 import 'package:analysis_server/src/protocol.dart' as protocol show Element, |
| 10 ElementKind; | 10 ElementKind; |
| (...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2690 assertSuggestInvocationMethod('m', 'A', null); | 2690 assertSuggestInvocationMethod('m', 'A', null); |
| 2691 assertSuggestInvocationMethod('_n', 'A', 'I'); | 2691 assertSuggestInvocationMethod('_n', 'A', 'I'); |
| 2692 assertNotSuggested('a'); | 2692 assertNotSuggested('a'); |
| 2693 assertNotSuggested('A'); | 2693 assertNotSuggested('A'); |
| 2694 assertNotSuggested('X'); | 2694 assertNotSuggested('X'); |
| 2695 assertNotSuggested('Object'); | 2695 assertNotSuggested('Object'); |
| 2696 assertNotSuggested('=='); | 2696 assertNotSuggested('=='); |
| 2697 }); | 2697 }); |
| 2698 } | 2698 } |
| 2699 | 2699 |
| 2700 test_PrefixedIdentifier_getter() { |
| 2701 // SimpleIdentifier PrefixedIdentifier ExpressionStatement |
| 2702 addTestSource('String get g => "one"; f() {g.^}'); |
| 2703 computeFast(); |
| 2704 return computeFull((bool result) { |
| 2705 assertSuggestInvocationGetter('length', 'int'); |
| 2706 }); |
| 2707 } |
| 2708 |
| 2700 test_PrefixedIdentifier_library() { | 2709 test_PrefixedIdentifier_library() { |
| 2701 // SimpleIdentifier PrefixedIdentifier ExpressionStatement | 2710 // SimpleIdentifier PrefixedIdentifier ExpressionStatement |
| 2702 addSource('/testB.dart', ''' | 2711 addSource('/testB.dart', ''' |
| 2703 lib B; | 2712 lib B; |
| 2704 var T1; | 2713 var T1; |
| 2705 class X { } | 2714 class X { } |
| 2706 class Y { }'''); | 2715 class Y { }'''); |
| 2707 addTestSource(''' | 2716 addTestSource(''' |
| 2708 import "/testB.dart" as b; | 2717 import "/testB.dart" as b; |
| 2709 var T2; | 2718 var T2; |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2982 assertNotSuggested('bar2'); | 2991 assertNotSuggested('bar2'); |
| 2983 assertNotSuggested('_B'); | 2992 assertNotSuggested('_B'); |
| 2984 assertSuggestLocalClass('Y'); | 2993 assertSuggestLocalClass('Y'); |
| 2985 assertSuggestLocalClass('C'); | 2994 assertSuggestLocalClass('C'); |
| 2986 assertSuggestLocalVariable('f', null); | 2995 assertSuggestLocalVariable('f', null); |
| 2987 assertNotSuggested('x'); | 2996 assertNotSuggested('x'); |
| 2988 assertNotSuggested('e'); | 2997 assertNotSuggested('e'); |
| 2989 }); | 2998 }); |
| 2990 } | 2999 } |
| 2991 } | 3000 } |
| OLD | NEW |