| Index: pkg/analyzer_plugin/test/plugin/plugin_test.dart
|
| diff --git a/pkg/analyzer_plugin/test/plugin/plugin_test.dart b/pkg/analyzer_plugin/test/plugin/plugin_test.dart
|
| index 85c1c6beb813165f1c4bb03632723d6814b61d81..a9dd530de7f4356cab728ba5e5f33746a5e3a892 100644
|
| --- a/pkg/analyzer_plugin/test/plugin/plugin_test.dart
|
| +++ b/pkg/analyzer_plugin/test/plugin/plugin_test.dart
|
| @@ -19,6 +19,11 @@ void main() {
|
| }
|
|
|
| class MockAnalysisDriver extends AnalysisDriverGeneric {
|
| + /**
|
| + * The files that have been added to this driver.
|
| + */
|
| + List<String> addedFiles = <String>[];
|
| +
|
| @override
|
| bool get hasFilesToAnalyze => false;
|
|
|
| @@ -29,6 +34,11 @@ class MockAnalysisDriver extends AnalysisDriverGeneric {
|
| AnalysisDriverPriority get workPriority => AnalysisDriverPriority.nothing;
|
|
|
| @override
|
| + void addFile(String path) {
|
| + addedFiles.add(path);
|
| + }
|
| +
|
| + @override
|
| void dispose() {}
|
|
|
| @override
|
| @@ -120,7 +130,9 @@ class ServerPluginTest {
|
| var result = await plugin.handleAnalysisSetContextRoots(
|
| new AnalysisSetContextRootsParams([contextRoot1]));
|
| expect(result, isNotNull);
|
| - expect(plugin.driverMap[contextRoot1], isNotNull);
|
| + AnalysisDriverGeneric driver = plugin.driverMap[contextRoot1];
|
| + expect(driver, isNotNull);
|
| + expect((driver as MockAnalysisDriver).addedFiles, hasLength(1));
|
| }
|
|
|
| test_handleAnalysisSetPriorityFiles() async {
|
|
|