| 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 import 'package:analysis_server/protocol/protocol.dart'; | 5 import 'package:analysis_server/protocol/protocol.dart'; |
| 6 import 'package:analysis_server/protocol/protocol_generated.dart'; | 6 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 7 import 'package:analysis_server/src/constants.dart'; | 7 import 'package:analysis_server/src/constants.dart'; |
| 8 import 'package:analysis_server/src/context_manager.dart'; | 8 import 'package:analysis_server/src/context_manager.dart'; |
| 9 import 'package:analysis_server/src/domain_analysis.dart'; | 9 import 'package:analysis_server/src/domain_analysis.dart'; |
| 10 import 'package:analyzer/src/dart/analysis/driver.dart'; | 10 import 'package:analyzer/src/dart/analysis/driver.dart'; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 void processNotification(Notification notification) { | 31 void processNotification(Notification notification) { |
| 32 if (notification.event == ANALYSIS_ERRORS) { | 32 if (notification.event == ANALYSIS_ERRORS) { |
| 33 var decoded = new AnalysisErrorsParams.fromNotification(notification); | 33 var decoded = new AnalysisErrorsParams.fromNotification(notification); |
| 34 filesErrors[decoded.file] = decoded.errors; | 34 filesErrors[decoded.file] = decoded.errors; |
| 35 } | 35 } |
| 36 } | 36 } |
| 37 | 37 |
| 38 @override | 38 @override |
| 39 void setUp() { | 39 void setUp() { |
| 40 enableNewAnalysisDriver = true; | |
| 41 generateSummaryFiles = true; | 40 generateSummaryFiles = true; |
| 42 registerLintRules(); | 41 registerLintRules(); |
| 43 super.setUp(); | 42 super.setUp(); |
| 44 server.handlers = [ | 43 server.handlers = [ |
| 45 new AnalysisDomainHandler(server), | 44 new AnalysisDomainHandler(server), |
| 46 ]; | 45 ]; |
| 47 } | 46 } |
| 48 | 47 |
| 49 test_importError() async { | 48 test_importError() async { |
| 50 createProject(); | 49 createProject(); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 '''); | 144 '''); |
| 146 await waitForTasksFinished(); | 145 await waitForTasksFinished(); |
| 147 await pumpEventQueue(); | 146 await pumpEventQueue(); |
| 148 List<AnalysisError> errors = filesErrors[testFile]; | 147 List<AnalysisError> errors = filesErrors[testFile]; |
| 149 expect(errors, hasLength(1)); | 148 expect(errors, hasLength(1)); |
| 150 AnalysisError error = errors[0]; | 149 AnalysisError error = errors[0]; |
| 151 expect(error.severity, AnalysisErrorSeverity.WARNING); | 150 expect(error.severity, AnalysisErrorSeverity.WARNING); |
| 152 expect(error.type, AnalysisErrorType.STATIC_WARNING); | 151 expect(error.type, AnalysisErrorType.STATIC_WARNING); |
| 153 } | 152 } |
| 154 } | 153 } |
| OLD | NEW |