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

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

Issue 2613123003: Fix the rest of Quick Assist 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 | « no previous file | 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/correction/assist_test.dart
diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
index c1f2782f4025b9f87b1e367054dabec3668cd79e..29ce28a3cebd01d7f92036a701263bafeac15688 100644
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart
@@ -503,10 +503,14 @@ main() {
Source appSource = addSource('/app.dart', appCode);
testSource = addSource('/test.dart', testCode);
// resolve
- context.resolveCompilationUnit2(appSource, appSource);
- testUnit = context.resolveCompilationUnit2(testSource, appSource);
- testUnitElement = testUnit.element;
- testLibraryElement = testUnitElement.library;
+ if (enableNewAnalysisDriver) {
+ await resolveTestUnit(testCode);
+ } else {
+ context.resolveCompilationUnit2(appSource, appSource);
+ testUnit = context.resolveCompilationUnit2(testSource, appSource);
+ testUnitElement = testUnit.element;
+ testLibraryElement = testUnitElement.library;
+ }
// prepare the assist
offset = findOffset('v = ');
assist = await _assertHasAssist(DartAssistKind.ADD_TYPE_ANNOTATION);
@@ -2689,8 +2693,9 @@ main(p) {
test_invalidSelection() async {
await resolveTestUnit('');
- List<Assist> assists = await computeAssists(plugin, context,
- resolutionMap.elementDeclaredByCompilationUnit(testUnit).source, -1, 0);
+ offset = -1;
+ length = 0;
+ List<Assist> assists = await _computeAssists();
expect(assists, isEmpty);
}
@@ -4213,18 +4218,6 @@ main() {
class AssistProcessorTest_Driver extends AssistProcessorTest {
@override
bool get enableNewAnalysisDriver => true;
-
- @failingTest
- @override
- test_addTypeAnnotation_local_OK_addImport_notLibraryUnit() {
- return super.test_addTypeAnnotation_local_OK_addImport_notLibraryUnit();
- }
-
- @failingTest
- @override
- test_invalidSelection() {
- return super.test_invalidSelection();
- }
}
class _DartAssistContextForValues implements DartAssistContext {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698