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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 2935733003: Remove some unnecessary tests for non-driver mode (Closed)
Patch Set: Created 3 years, 6 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
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index ce3f8c20ecd3efa238ec8e12e35e0efd56637fa0..b6bf1e015823ee1771e3dfd841bad8707ed070e2 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -153,11 +153,7 @@ bool test() {
}
Future<List<AnalysisError>> _computeErrors() async {
- if (enableNewAnalysisDriver) {
- return (await driver.getResult(testFile)).errors;
- } else {
- return context.computeErrors(testSource);
- }
+ return (await driver.getResult(testFile)).errors;
}
/**
@@ -184,11 +180,7 @@ bool test() {
});
SourceFactory sourceFactory = new SourceFactory(
[new DartUriResolver(sdk), pkgResolver, resourceResolver]);
- if (enableNewAnalysisDriver) {
- driver.configure(sourceFactory: sourceFactory);
- } else {
- context.sourceFactory = sourceFactory;
- }
+ driver.configure(sourceFactory: sourceFactory);
// force 'my_pkg' resolution
addSource(
'/tmp/other.dart',
@@ -2244,13 +2236,8 @@ part 'my_part.dart';
});
SourceFactory sourceFactory = new SourceFactory(
[new DartUriResolver(sdk), pkgResolver, resourceResolver]);
- if (enableNewAnalysisDriver) {
- driver.configure(sourceFactory: sourceFactory);
- testUnit = (await driver.getResult(testFile)).unit;
- } else {
- context.sourceFactory = sourceFactory;
- testUnit = await resolveLibraryUnit(testSource);
- }
+ driver.configure(sourceFactory: sourceFactory);
+ testUnit = (await driver.getResult(testFile)).unit;
// prepare fix
AnalysisError error = await _findErrorToFix();
fix = await _assertHasFix(DartFixKind.CREATE_FILE, error);
@@ -5896,11 +5883,7 @@ class Required {
});
SourceFactory sourceFactory = new SourceFactory(
[new DartUriResolver(sdk), pkgResolver, resourceResolver]);
- if (enableNewAnalysisDriver) {
- driver.configure(sourceFactory: sourceFactory);
- } else {
- context.sourceFactory = sourceFactory;
- }
+ driver.configure(sourceFactory: sourceFactory);
// force 'flutter' resolution
addSource(
'/tmp/other.dart',

Powered by Google App Engine
This is Rietveld 408576698