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

Side by Side Diff: pkg/analysis_server/test/search/element_references_test.dart

Issue 2868353002: Enable analysis driver in tests where possible (Closed)
Patch Set: Created 3 years, 7 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 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/protocol/protocol.dart'; 7 import 'package:analysis_server/protocol/protocol.dart';
8 import 'package:analysis_server/protocol/protocol_generated.dart'; 8 import 'package:analysis_server/protocol/protocol_generated.dart';
9 import 'package:analysis_server/src/services/index/index.dart'; 9 import 'package:analysis_server/src/services/index/index.dart';
10 import 'package:test/test.dart'; 10 import 'package:test/test.dart';
(...skipping 27 matching lines...) Expand all
38 Response response = await waitResponse(request); 38 Response response = await waitResponse(request);
39 var result = new SearchFindElementReferencesResult.fromResponse(response); 39 var result = new SearchFindElementReferencesResult.fromResponse(response);
40 searchId = result.id; 40 searchId = result.id;
41 searchElement = result.element; 41 searchElement = result.element;
42 if (searchId != null) { 42 if (searchId != null) {
43 await waitForSearchResults(); 43 await waitForSearchResults();
44 } 44 }
45 expect(serverErrors, isEmpty); 45 expect(serverErrors, isEmpty);
46 } 46 }
47 47
48 @override
49 void setUp() {
50 enableNewAnalysisDriver = false;
51 super.setUp();
52 }
53
48 test_constructor_named() async { 54 test_constructor_named() async {
49 addTestFile(''' 55 addTestFile('''
50 class A { 56 class A {
51 A.named(p); 57 A.named(p);
52 } 58 }
53 main() { 59 main() {
54 new A.named(1); 60 new A.named(1);
55 new A.named(2); 61 new A.named(2);
56 } 62 }
57 '''); 63 ''');
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 } 679 }
674 } 680 }
675 681
676 @reflectiveTest 682 @reflectiveTest
677 class _NoSearchEngine extends AbstractSearchDomainTest { 683 class _NoSearchEngine extends AbstractSearchDomainTest {
678 @override 684 @override
679 Index createIndex() { 685 Index createIndex() {
680 return null; 686 return null;
681 } 687 }
682 688
689 @override
690 void setUp() {
691 enableNewAnalysisDriver = false;
692 super.setUp();
693 }
694
683 test_requestError_noSearchEngine() async { 695 test_requestError_noSearchEngine() async {
684 addTestFile(''' 696 addTestFile('''
685 main() { 697 main() {
686 var vvv = 1; 698 var vvv = 1;
687 print(vvv); 699 print(vvv);
688 } 700 }
689 '''); 701 ''');
690 Request request = new SearchFindElementReferencesParams(testFile, 0, false) 702 Request request = new SearchFindElementReferencesParams(testFile, 0, false)
691 .toRequest('0'); 703 .toRequest('0');
692 Response response = await waitResponse(request); 704 Response response = await waitResponse(request);
693 expect(response.error, isNotNull); 705 expect(response.error, isNotNull);
694 expect(response.error.code, RequestErrorCode.NO_INDEX_GENERATED); 706 expect(response.error.code, RequestErrorCode.NO_INDEX_GENERATED);
695 } 707 }
696 } 708 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/edit/refactoring_test.dart ('k') | pkg/analysis_server/test/search/member_declarations_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698