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.analysis.get_errors; | 5 library test.analysis.get_errors; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/src/domain_analysis.dart'; | 9 import 'package:analysis_server/src/domain_analysis.dart'; |
10 import 'package:analysis_server/src/protocol.dart'; | 10 import 'package:analysis_server/src/protocol.dart'; |
11 import 'package:analyzer/file_system/file_system.dart'; | 11 import 'package:analyzer/file_system/file_system.dart'; |
| 12 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
12 import 'package:unittest/unittest.dart'; | 13 import 'package:unittest/unittest.dart'; |
13 | 14 |
14 import '../analysis_abstract.dart'; | 15 import '../analysis_abstract.dart'; |
15 import '../reflective_tests.dart'; | |
16 | 16 |
17 main() { | 17 main() { |
18 groupSep = ' | '; | 18 groupSep = ' | '; |
19 runReflectiveTests(GetErrorsTest); | 19 defineReflectiveTests(GetErrorsTest); |
20 } | 20 } |
21 | 21 |
22 @reflectiveTest | 22 @reflectiveTest |
23 class GetErrorsTest extends AbstractAnalysisTest { | 23 class GetErrorsTest extends AbstractAnalysisTest { |
24 static const String requestId = 'test-getError'; | 24 static const String requestId = 'test-getError'; |
25 | 25 |
26 @override | 26 @override |
27 void setUp() { | 27 void setUp() { |
28 super.setUp(); | 28 super.setUp(); |
29 server.handlers = [new AnalysisDomainHandler(server),]; | 29 server.handlers = [new AnalysisDomainHandler(server),]; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 return new AnalysisGetErrorsParams(testFile).toRequest(requestId); | 120 return new AnalysisGetErrorsParams(testFile).toRequest(requestId); |
121 } | 121 } |
122 | 122 |
123 Future<List<AnalysisError>> _getErrors(String file) { | 123 Future<List<AnalysisError>> _getErrors(String file) { |
124 Request request = _createGetErrorsRequest(); | 124 Request request = _createGetErrorsRequest(); |
125 return serverChannel.sendRequest(request).then((Response response) { | 125 return serverChannel.sendRequest(request).then((Response response) { |
126 return new AnalysisGetErrorsResult.fromResponse(response).errors; | 126 return new AnalysisGetErrorsResult.fromResponse(response).errors; |
127 }); | 127 }); |
128 } | 128 } |
129 } | 129 } |
OLD | NEW |