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

Side by Side Diff: pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart

Issue 2478963002: Completion with the new analysis driver. (Closed)
Patch Set: Fixes for review comments. Created 4 years, 1 month 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
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.services.completion.dart.manager; 5 library test.services.completion.dart.manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
10 import 'package:analysis_server/src/services/completion/completion_core.dart'; 10 import 'package:analysis_server/src/services/completion/completion_core.dart';
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 import "/libA.dart" as foo; 49 import "/libA.dart" as foo;
50 part '$testFile'; 50 part '$testFile';
51 '''); 51 ''');
52 addTestSource('part of libB; main() {^}'); 52 addTestSource('part of libB; main() {^}');
53 53
54 // Associate part with library 54 // Associate part with library
55 context.computeResult(libSource, LIBRARY_CYCLE_UNITS); 55 context.computeResult(libSource, LIBRARY_CYCLE_UNITS);
56 56
57 // Build the request 57 // Build the request
58 CompletionRequestImpl baseRequest = new CompletionRequestImpl( 58 CompletionRequestImpl baseRequest = new CompletionRequestImpl(
59 null,
59 context, 60 context,
60 provider, 61 provider,
61 searchEngine, 62 searchEngine,
62 testSource, 63 testSource,
63 completionOffset, 64 completionOffset,
64 new CompletionPerformance()); 65 new CompletionPerformance());
65 Completer<DartCompletionRequest> requestCompleter = 66 Completer<DartCompletionRequest> requestCompleter =
66 new Completer<DartCompletionRequest>(); 67 new Completer<DartCompletionRequest>();
67 DartCompletionRequestImpl 68 DartCompletionRequestImpl
68 .from(baseRequest, resultDescriptor: RESOLVED_UNIT1) 69 .from(baseRequest, resultDescriptor: RESOLVED_UNIT1)
(...skipping 26 matching lines...) Expand all
95 void assertImportedLib(String expectedUri) { 96 void assertImportedLib(String expectedUri) {
96 ImportElement importElem = importNamed(expectedUri); 97 ImportElement importElem = importNamed(expectedUri);
97 expect(importElem.importedLibrary.exportNamespace, isNotNull); 98 expect(importElem.importedLibrary.exportNamespace, isNotNull);
98 } 99 }
99 100
100 // Assert that the new imports each have an export namespace 101 // Assert that the new imports each have an export namespace
101 assertImportedLib(null /* dart:core */); 102 assertImportedLib(null /* dart:core */);
102 assertImportedLib('/libA.dart'); 103 assertImportedLib('/libA.dart');
103 } 104 }
104 } 105 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698