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

Unified Diff: pkg/analyzer2dart/lib/src/driver.dart

Issue 524463006: Use MockSdk to speed-up tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rollback r39701 Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer2dart/bin/analyzer2dart.dart ('k') | pkg/analyzer2dart/test/driver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer2dart/lib/src/driver.dart
diff --git a/pkg/analyzer2dart/lib/src/driver.dart b/pkg/analyzer2dart/lib/src/driver.dart
index 32daaf5ea2a89e33382f20a3e531856f3da12f5c..27488138357b9da9c8a7428cb443a06d2977ea6e 100644
--- a/pkg/analyzer2dart/lib/src/driver.dart
+++ b/pkg/analyzer2dart/lib/src/driver.dart
@@ -7,7 +7,7 @@ library analyzer2dart.driver;
import 'package:analyzer/src/generated/element.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/java_io.dart';
-import 'package:analyzer/src/generated/sdk_io.dart';
+import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'closed_world.dart';
@@ -19,12 +19,12 @@ import 'tree_shaker.dart';
class Driver {
AnalysisContext context;
- Driver() : context = AnalysisEngine.instance.createAnalysisContext() {
+ Driver(DartSdk sdk) : context = AnalysisEngine.instance.createAnalysisContext() {
// Set up the source factory.
// TODO(paulberry): do we want to use ExplicitPackageUriResolver?
List<UriResolver> uriResolvers = [
new FileUriResolver(),
- new DartUriResolver(DirectoryBasedDartSdk.defaultSdk) /* ,
+ new DartUriResolver(sdk) /* ,
new PackageUriResolver(packagesDirectories) */
];
context.sourceFactory = new SourceFactory(uriResolvers);
« no previous file with comments | « pkg/analyzer2dart/bin/analyzer2dart.dart ('k') | pkg/analyzer2dart/test/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698