| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; |
| 6 | 7 |
| 7 import 'package:analyzer/file_system/file_system.dart'; | 8 import 'package:analyzer/file_system/file_system.dart'; |
| 8 import 'package:analyzer/src/dart/analysis/driver.dart'; | 9 import 'package:analyzer/src/dart/analysis/driver.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; |
| 9 import 'package:analyzer/src/generated/source.dart'; | 11 import 'package:analyzer/src/generated/source.dart'; |
| 10 import 'package:analyzer_plugin/channel/channel.dart'; | 12 import 'package:analyzer_plugin/channel/channel.dart'; |
| 11 import 'package:analyzer_plugin/plugin/plugin.dart'; | 13 import 'package:analyzer_plugin/plugin/plugin.dart'; |
| 12 import 'package:analyzer_plugin/protocol/protocol.dart'; | 14 import 'package:analyzer_plugin/protocol/protocol.dart'; |
| 13 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; | 15 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; |
| 14 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart'; | 16 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart'; |
| 15 import 'package:front_end/src/base/timestamped_data.dart'; | 17 import 'package:front_end/src/base/timestamped_data.dart'; |
| 16 import 'package:test/test.dart'; | 18 import 'package:test/test.dart'; |
| 17 | 19 |
| 18 class MockAnalysisDriver extends AnalysisDriverGeneric { | 20 class MockAnalysisDriver extends AnalysisDriver { |
| 19 /** | 21 @override |
| 20 * The files that have been added to this driver. | 22 Set<String> addedFiles = new HashSet<String>(); |
| 21 */ | 23 |
| 22 List<String> addedFiles = <String>[]; | 24 MockAnalysisDriver() |
| 25 : super(new AnalysisDriverScheduler(null), null, null, null, null, null, |
| 26 new SourceFactory([]), new AnalysisOptionsImpl()); |
| 23 | 27 |
| 24 @override | 28 @override |
| 25 bool get hasFilesToAnalyze => false; | 29 bool get hasFilesToAnalyze => false; |
| 26 | 30 |
| 27 @override | 31 @override |
| 28 set priorityFiles(List<String> priorityPaths) {} | 32 set priorityFiles(List<String> priorityPaths) {} |
| 29 | 33 |
| 30 @override | 34 @override |
| 31 AnalysisDriverPriority get workPriority => AnalysisDriverPriority.nothing; | 35 AnalysisDriverPriority get workPriority => AnalysisDriverPriority.nothing; |
| 32 | 36 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 157 |
| 154 @override | 158 @override |
| 155 Uri get uri => Uri.parse('package:test/test.dart'); | 159 Uri get uri => Uri.parse('package:test/test.dart'); |
| 156 | 160 |
| 157 @override | 161 @override |
| 158 UriKind get uriKind => UriKind.PACKAGE_URI; | 162 UriKind get uriKind => UriKind.PACKAGE_URI; |
| 159 | 163 |
| 160 @override | 164 @override |
| 161 bool exists() => true; | 165 bool exists() => true; |
| 162 } | 166 } |
| OLD | NEW |