OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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.edit.statement_completion; | |
6 | |
7 import 'package:analysis_server/protocol/protocol.dart'; | 5 import 'package:analysis_server/protocol/protocol.dart'; |
8 import 'package:analysis_server/protocol/protocol_generated.dart'; | 6 import 'package:analysis_server/protocol/protocol_generated.dart'; |
9 import 'package:analysis_server/src/edit/edit_domain.dart'; | 7 import 'package:analysis_server/src/edit/edit_domain.dart'; |
| 8 import 'package:analyzer_plugin/protocol/protocol_common.dart'; |
10 import 'package:plugin/manager.dart'; | 9 import 'package:plugin/manager.dart'; |
11 import 'package:test/test.dart'; | 10 import 'package:test/test.dart'; |
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
13 | 12 |
14 import '../analysis_abstract.dart'; | 13 import '../analysis_abstract.dart'; |
15 | 14 |
16 main() { | 15 main() { |
17 defineReflectiveSuite(() { | 16 defineReflectiveSuite(() { |
18 defineReflectiveTests(StatementCompletionTest); | 17 defineReflectiveTests(StatementCompletionTest); |
19 }); | 18 }); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 } | 120 } |
122 | 121 |
123 _prepareCompletionAt(int offset) async { | 122 _prepareCompletionAt(int offset) async { |
124 Request request = | 123 Request request = |
125 new EditGetStatementCompletionParams(testFile, offset).toRequest('0'); | 124 new EditGetStatementCompletionParams(testFile, offset).toRequest('0'); |
126 Response response = await waitResponse(request); | 125 Response response = await waitResponse(request); |
127 var result = new EditGetStatementCompletionResult.fromResponse(response); | 126 var result = new EditGetStatementCompletionResult.fromResponse(response); |
128 change = result.change; | 127 change = result.change; |
129 } | 128 } |
130 } | 129 } |
OLD | NEW |