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

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

Issue 2572203002: Add completion tests for the new analysis driver. (Closed)
Patch Set: Created 4 years 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
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';
11 import 'package:analysis_server/src/services/completion/completion_performance.d art'; 11 import 'package:analysis_server/src/services/completion/completion_performance.d art';
12 import 'package:analysis_server/src/services/completion/dart/completion_manager. dart'; 12 import 'package:analysis_server/src/services/completion/dart/completion_manager. dart';
13 import 'package:analysis_server/src/services/completion/dart/imported_reference_ contributor.dart'; 13 import 'package:analysis_server/src/services/completion/dart/imported_reference_ contributor.dart';
14 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 14 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
15 import 'package:analyzer/dart/element/element.dart'; 15 import 'package:analyzer/dart/element/element.dart';
16 import 'package:analyzer/src/task/dart.dart'; 16 import 'package:analyzer/src/task/dart.dart';
17 import 'package:test/test.dart'; 17 import 'package:test/test.dart';
18 import 'package:test_reflective_loader/test_reflective_loader.dart'; 18 import 'package:test_reflective_loader/test_reflective_loader.dart';
19 19
20 import 'completion_contributor_util.dart'; 20 import 'completion_contributor_util.dart';
21 21
22 main() { 22 main() {
23 defineReflectiveSuite(() { 23 defineReflectiveSuite(() {
24 defineReflectiveTests(CompletionManagerTest); 24 defineReflectiveTests(CompletionManagerTest);
25 defineReflectiveTests(CompletionManagerTest_Driver);
25 }); 26 });
26 } 27 }
27 28
28 @reflectiveTest 29 @reflectiveTest
29 class CompletionManagerTest extends DartCompletionContributorTest { 30 class CompletionManagerTest extends DartCompletionContributorTest {
30 @override 31 @override
31 DartCompletionContributor createContributor() { 32 DartCompletionContributor createContributor() {
32 return new ImportedReferenceContributor(); 33 return new ImportedReferenceContributor();
33 } 34 }
34 35
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void assertImportedLib(String expectedUri) { 99 void assertImportedLib(String expectedUri) {
99 ImportElement importElem = importNamed(expectedUri); 100 ImportElement importElem = importNamed(expectedUri);
100 expect(importElem.importedLibrary.exportNamespace, isNotNull); 101 expect(importElem.importedLibrary.exportNamespace, isNotNull);
101 } 102 }
102 103
103 // Assert that the new imports each have an export namespace 104 // Assert that the new imports each have an export namespace
104 assertImportedLib(null /* dart:core */); 105 assertImportedLib(null /* dart:core */);
105 assertImportedLib('/libA.dart'); 106 assertImportedLib('/libA.dart');
106 } 107 }
107 } 108 }
109
110 @reflectiveTest
111 class CompletionManagerTest_Driver extends CompletionManagerTest {
112 @override
113 bool get enableNewAnalysisDriver => true;
114
115 @failingTest
116 @override
117 test_resolveDirectives() {
118 // Bad state: Should not be used with the new analysis driver.
119 return super.test_resolveDirectives();
120 }
121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698