Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: pkg/analyzer/test/src/context/abstract_context.dart

Issue 1487953002: Clean-up the registration of plugins (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.src.task.abstract_context_test; 5 library test.src.task.abstract_context_test;
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/context/context.dart'; 10 import 'package:analyzer/src/context/context.dart';
11 import 'package:analyzer/src/generated/element.dart'; 11 import 'package:analyzer/src/generated/element.dart';
12 import 'package:analyzer/src/generated/engine.dart' 12 import 'package:analyzer/src/generated/engine.dart'
13 hide AnalysisCache, AnalysisContextImpl, AnalysisTask; 13 hide AnalysisCache, AnalysisContextImpl, AnalysisTask;
14 import 'package:analyzer/src/generated/sdk.dart'; 14 import 'package:analyzer/src/generated/sdk.dart';
15 import 'package:analyzer/src/generated/source.dart'; 15 import 'package:analyzer/src/generated/source.dart';
16 import 'package:analyzer/src/task/driver.dart'; 16 import 'package:analyzer/src/task/driver.dart';
17 import 'package:analyzer/task/model.dart'; 17 import 'package:analyzer/task/model.dart';
18 import 'package:plugin/manager.dart';
19 import 'package:plugin/plugin.dart';
18 import 'package:unittest/unittest.dart'; 20 import 'package:unittest/unittest.dart';
19 21
20 import 'mock_sdk.dart'; 22 import 'mock_sdk.dart';
21 23
22 class AbstractContextTest { 24 class AbstractContextTest {
23 MemoryResourceProvider resourceProvider = new MemoryResourceProvider(); 25 MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
24 26
25 DartSdk sdk = new MockSdk(); 27 DartSdk sdk = new MockSdk();
26 SourceFactory sourceFactory; 28 SourceFactory sourceFactory;
27 AnalysisContextImpl context; 29 AnalysisContextImpl context;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 context = createAnalysisContext(); 119 context = createAnalysisContext();
118 if (options != null) { 120 if (options != null) {
119 context.analysisOptions = options; 121 context.analysisOptions = options;
120 } 122 }
121 context.sourceFactory = sourceFactory; 123 context.sourceFactory = sourceFactory;
122 analysisCache = context.analysisCache; 124 analysisCache = context.analysisCache;
123 analysisDriver = context.driver; 125 analysisDriver = context.driver;
124 } 126 }
125 127
126 void setUp() { 128 void setUp() {
129 List<Plugin> plugins = <Plugin>[];
130 plugins.addAll(AnalysisEngine.instance.requiredPlugins);
131 plugins.add(AnalysisEngine.instance.commandLinePlugin);
132 plugins.add(AnalysisEngine.instance.optionsPlugin);
133
134 ExtensionManager manager = new ExtensionManager();
135 manager.processPlugins(plugins);
136
127 prepareAnalysisContext(); 137 prepareAnalysisContext();
128 } 138 }
129 139
130 void tearDown() {} 140 void tearDown() {}
131 } 141 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/test_support.dart ('k') | pkg/analyzer/test/src/summary/summary_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698