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

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

Issue 2864813002: Switch the default from non-driver to driver in several tests (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 'package:analysis_server/protocol/protocol_generated.dart'; 5 import 'package:analysis_server/protocol/protocol_generated.dart';
6 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 6 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
7 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar t'; 7 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar t';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:path/path.dart'; 9 import 'package:path/path.dart';
10 import 'package:test/test.dart'; 10 import 'package:test/test.dart';
11 import 'package:test_reflective_loader/test_reflective_loader.dart'; 11 import 'package:test_reflective_loader/test_reflective_loader.dart';
12 12
13 import 'completion_contributor_util.dart'; 13 import 'completion_contributor_util.dart';
14 14
15 main() { 15 main() {
16 defineReflectiveSuite(() { 16 defineReflectiveSuite(() {
17 defineReflectiveTests(UriContributorTest); 17 defineReflectiveTests(UriContributorTest);
18 defineReflectiveTests(UriContributorWindowsTest); 18 defineReflectiveTests(UriContributorWindowsTest);
19 }); 19 });
20 } 20 }
21 21
22 @reflectiveTest 22 @reflectiveTest
23 class UriContributorTest extends DartCompletionContributorTest { 23 class UriContributorTest extends DartCompletionContributorTest {
24 @override 24 @override
25 bool get enableNewAnalysisDriver => true;
26
27 @override
28 DartCompletionContributor createContributor() { 25 DartCompletionContributor createContributor() {
29 return new UriContributor(); 26 return new UriContributor();
30 } 27 }
31 28
32 test_after_import() async { 29 test_after_import() async {
33 addTestSource('import "p"^'); 30 addTestSource('import "p"^');
34 await computeSuggestions(); 31 await computeSuggestions();
35 expect(replacementOffset, completionOffset); 32 expect(replacementOffset, completionOffset);
36 expect(replacementLength, 0); 33 expect(replacementLength, 0);
37 assertNoSuggestions(); 34 assertNoSuggestions();
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 assertNotSuggested('foo'); 456 assertNotSuggested('foo');
460 assertNotSuggested('foo/'); 457 assertNotSuggested('foo/');
461 assertNotSuggested('foo/bar.dart'); 458 assertNotSuggested('foo/bar.dart');
462 assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT); 459 assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT);
463 } 460 }
464 } 461 }
465 462
466 @reflectiveTest 463 @reflectiveTest
467 class UriContributorWindowsTest extends DartCompletionContributorTest { 464 class UriContributorWindowsTest extends DartCompletionContributorTest {
468 @override 465 @override
469 bool get enableNewAnalysisDriver => true;
470
471 @override
472 DartCompletionContributor createContributor() { 466 DartCompletionContributor createContributor() {
473 return new UriContributor(); 467 return new UriContributor();
474 } 468 }
475 469
476 @override 470 @override
477 void setupResourceProvider() { 471 void setupResourceProvider() {
478 provider = new _TestWinResourceProvider(); 472 provider = new _TestWinResourceProvider();
479 } 473 }
480 474
481 test_import_file() async { 475 test_import_file() async {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 assertNotSuggested('foo/'); 623 assertNotSuggested('foo/');
630 assertNotSuggested('foo/bar.dart'); 624 assertNotSuggested('foo/bar.dart');
631 assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT); 625 assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT);
632 } 626 }
633 } 627 }
634 628
635 class _TestWinResourceProvider extends MemoryResourceProvider { 629 class _TestWinResourceProvider extends MemoryResourceProvider {
636 @override 630 @override
637 Context get pathContext => windows; 631 Context get pathContext => windows;
638 } 632 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698