| 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:unittest/unittest.dart'; | 12 import 'package:unittest/unittest.dart'; |
| 13 | 13 |
| 14 import '../analysis_abstract.dart'; | 14 import '../analysis_abstract.dart'; |
| 15 import '../reflective_tests.dart'; | 15 import '../reflective_tests.dart'; |
| 16 | 16 |
| 17 | 17 |
| 18 main() { | 18 main() { |
| 19 groupSep = ' | '; | 19 groupSep = ' | '; |
| 20 runReflectiveTests(GetErrorsTest); | 20 runReflectiveTests(GetErrorsTest); |
| 21 } | 21 } |
| 22 | 22 |
| 23 | 23 |
| 24 @ReflectiveTestCase() | 24 @reflectiveTest |
| 25 class GetErrorsTest extends AbstractAnalysisTest { | 25 class GetErrorsTest extends AbstractAnalysisTest { |
| 26 static const String requestId = 'test-getError'; | 26 static const String requestId = 'test-getError'; |
| 27 | 27 |
| 28 @override | 28 @override |
| 29 void setUp() { | 29 void setUp() { |
| 30 super.setUp(); | 30 super.setUp(); |
| 31 server.handlers = [new AnalysisDomainHandler(server),]; | 31 server.handlers = [new AnalysisDomainHandler(server),]; |
| 32 createProject(); | 32 createProject(); |
| 33 } | 33 } |
| 34 | 34 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 return new AnalysisGetErrorsParams(testFile).toRequest(requestId); | 122 return new AnalysisGetErrorsParams(testFile).toRequest(requestId); |
| 123 } | 123 } |
| 124 | 124 |
| 125 Future<List<AnalysisError>> _getErrors(String file) { | 125 Future<List<AnalysisError>> _getErrors(String file) { |
| 126 Request request = _createGetErrorsRequest(); | 126 Request request = _createGetErrorsRequest(); |
| 127 return serverChannel.sendRequest(request).then((Response response) { | 127 return serverChannel.sendRequest(request).then((Response response) { |
| 128 return new AnalysisGetErrorsResult.fromResponse(response).errors; | 128 return new AnalysisGetErrorsResult.fromResponse(response).errors; |
| 129 }); | 129 }); |
| 130 } | 130 } |
| 131 } | 131 } |
| OLD | NEW |