| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.updateContent; | 5 library test.analysis.updateContent; |
| 6 | 6 |
| 7 import 'package:analysis_server/protocol/protocol.dart'; | 7 import 'package:analysis_server/protocol/protocol.dart'; |
| 8 import 'package:analysis_server/protocol/protocol_generated.dart'; | 8 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 9 import 'package:analysis_server/src/analysis_server.dart'; | 9 import 'package:analysis_server/src/analysis_server.dart'; |
| 10 import 'package:analysis_server/src/constants.dart'; | 10 import 'package:analysis_server/src/constants.dart'; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 compilationUnitMatcher(String file) { | 31 compilationUnitMatcher(String file) { |
| 32 return new _ArgumentMatcher_CompilationUnit(file); | 32 return new _ArgumentMatcher_CompilationUnit(file); |
| 33 } | 33 } |
| 34 | 34 |
| 35 @reflectiveTest | 35 @reflectiveTest |
| 36 class UpdateContentTest extends AbstractAnalysisTest { | 36 class UpdateContentTest extends AbstractAnalysisTest { |
| 37 Map<String, List<String>> filesErrors = {}; | 37 Map<String, List<String>> filesErrors = {}; |
| 38 int serverErrorCount = 0; | 38 int serverErrorCount = 0; |
| 39 int navigationCount = 0; | 39 int navigationCount = 0; |
| 40 | 40 |
| 41 @override |
| 42 bool get enableNewAnalysisDriver => false; |
| 43 |
| 41 Index createIndex() { | 44 Index createIndex() { |
| 42 return new _MockIndex(); | 45 return new _MockIndex(); |
| 43 } | 46 } |
| 44 | 47 |
| 45 @override | 48 @override |
| 46 void processNotification(Notification notification) { | 49 void processNotification(Notification notification) { |
| 47 if (notification.event == ANALYSIS_ERRORS) { | 50 if (notification.event == ANALYSIS_ERRORS) { |
| 48 var decoded = new AnalysisErrorsParams.fromNotification(notification); | 51 var decoded = new AnalysisErrorsParams.fromNotification(notification); |
| 49 String _format(AnalysisError e) => | 52 String _format(AnalysisError e) => |
| 50 "${e.location.startLine}: ${e.message}"; | 53 "${e.location.startLine}: ${e.message}"; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 349 |
| 347 @override | 350 @override |
| 348 bool matches(arg) { | 351 bool matches(arg) { |
| 349 return arg is CompilationUnit && | 352 return arg is CompilationUnit && |
| 350 resolutionMap.elementDeclaredByCompilationUnit(arg).source.fullName == | 353 resolutionMap.elementDeclaredByCompilationUnit(arg).source.fullName == |
| 351 file; | 354 file; |
| 352 } | 355 } |
| 353 } | 356 } |
| 354 | 357 |
| 355 class _MockIndex extends TypedMock implements Index {} | 358 class _MockIndex extends TypedMock implements Index {} |
| OLD | NEW |