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

Unified Diff: pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart

Issue 2618243002: Fix the rest of the completion tests with the new analysis driver. (Closed)
Patch Set: Created 3 years, 11 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/analysis_server/test/integration/completion/get_suggestions_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
index f931c0d892931f68e91e0c3cb3cac5ca0eeb0781..055cfa072235520b6f7e8b83d044fb80fb261813 100644
--- a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
@@ -54,12 +54,14 @@ part '$testFile';
addTestSource('part of libB; main() {^}');
// Associate part with library
- context.computeResult(libSource, LIBRARY_CYCLE_UNITS);
+ if (!enableNewAnalysisDriver) {
+ context.computeResult(libSource, LIBRARY_CYCLE_UNITS);
+ }
// Build the request
CompletionRequestImpl baseRequest = new CompletionRequestImpl(
- null,
- context,
+ enableNewAnalysisDriver ? await driver.getResult(testFile) : null,
+ enableNewAnalysisDriver ? null : context,
provider,
searchEngine,
testSource,
@@ -78,8 +80,10 @@ part '$testFile';
var directives = request.target.unit.directives;
// Assert that the import does not have an export namespace
- Element element = resolutionMap.elementDeclaredByDirective(directives[0]);
- expect(element?.library?.exportNamespace, isNull);
+ if (!enableNewAnalysisDriver) {
+ Element element = resolutionMap.elementDeclaredByDirective(directives[0]);
+ expect(element?.library?.exportNamespace, isNull);
+ }
// Resolve directives
var importCompleter = new Completer<List<ImportElement>>();
@@ -111,11 +115,4 @@ part '$testFile';
class CompletionManagerTest_Driver extends CompletionManagerTest {
@override
bool get enableNewAnalysisDriver => true;
-
- @failingTest
- @override
- test_resolveDirectives() {
-// Bad state: Should not be used with the new analysis driver.
- return super.test_resolveDirectives();
- }
}
« no previous file with comments | « pkg/analysis_server/test/integration/completion/get_suggestions_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698