| 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 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 assertSuggestLocalVariable('a', 'int'); | 1119 assertSuggestLocalVariable('a', 'int'); |
| 1120 assertSuggestLocalFunction('main', null); | 1120 assertSuggestLocalFunction('main', null); |
| 1121 assertSuggestImportedFunction('identical', 'bool'); | 1121 assertSuggestImportedFunction('identical', 'bool'); |
| 1122 }); | 1122 }); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 test_AwaitExpression() { | 1125 test_AwaitExpression() { |
| 1126 // SimpleIdentifier AwaitExpression ExpressionStatement | 1126 // SimpleIdentifier AwaitExpression ExpressionStatement |
| 1127 addTestSource(''' | 1127 addTestSource(''' |
| 1128 class A {int x; int y() => 0;} | 1128 class A {int x; int y() => 0;} |
| 1129 main(){A a; await ^}'''); | 1129 main() async {A a; await ^}'''); |
| 1130 computeFast(); | 1130 computeFast(); |
| 1131 return computeFull((bool result) { | 1131 return computeFull((bool result) { |
| 1132 assertSuggestLocalVariable('a', 'A'); | 1132 assertSuggestLocalVariable('a', 'A'); |
| 1133 assertSuggestLocalFunction('main', null); | 1133 assertSuggestLocalFunction('main', null); |
| 1134 assertSuggestLocalClass('A'); | 1134 assertSuggestLocalClass('A'); |
| 1135 assertSuggestImportedClass('Object'); | 1135 assertSuggestImportedClass('Object'); |
| 1136 }); | 1136 }); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 test_BinaryExpression_LHS() { | 1139 test_BinaryExpression_LHS() { |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2620 assertNotSuggested('bar2'); | 2620 assertNotSuggested('bar2'); |
| 2621 assertNotSuggested('_B'); | 2621 assertNotSuggested('_B'); |
| 2622 assertSuggestLocalClass('Y'); | 2622 assertSuggestLocalClass('Y'); |
| 2623 assertSuggestLocalClass('C'); | 2623 assertSuggestLocalClass('C'); |
| 2624 assertSuggestLocalVariable('f', null); | 2624 assertSuggestLocalVariable('f', null); |
| 2625 assertNotSuggested('x'); | 2625 assertNotSuggested('x'); |
| 2626 assertNotSuggested('e'); | 2626 assertNotSuggested('e'); |
| 2627 }); | 2627 }); |
| 2628 } | 2628 } |
| 2629 } | 2629 } |
| OLD | NEW |