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

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

Issue 1525753003: extract LocalLibraryContributor from imported reference contributor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 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.util; 5 library test.services.completion.util;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol 9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
10 show Element, ElementKind; 10 show Element, ElementKind;
(...skipping 3735 matching lines...) Expand 10 before | Expand all | Expand 10 after
3746 main() {new ^}'''); 3746 main() {new ^}''');
3747 computeFast(); 3747 computeFast();
3748 return computeFull((bool result) { 3748 return computeFull((bool result) {
3749 expect(request.replacementOffset, completionOffset); 3749 expect(request.replacementOffset, completionOffset);
3750 expect(request.replacementLength, 0); 3750 expect(request.replacementLength, 0);
3751 // Suggested by ConstructorContributor 3751 // Suggested by ConstructorContributor
3752 assertNotSuggested('B.bar'); 3752 assertNotSuggested('B.bar');
3753 assertSuggestImportedConstructor('Object'); 3753 assertSuggestImportedConstructor('Object');
3754 assertSuggestImportedConstructor('X.c'); 3754 assertSuggestImportedConstructor('X.c');
3755 assertNotSuggested('X._d'); 3755 assertNotSuggested('X._d');
3756 assertSuggestImportedConstructor('A'); 3756 // Suggested by LocalLibraryContributor
3757 assertNotSuggested('A');
3757 assertNotSuggested('F1'); 3758 assertNotSuggested('F1');
3758 assertNotSuggested('T1'); 3759 assertNotSuggested('T1');
3759 assertNotSuggested('_d'); 3760 assertNotSuggested('_d');
3760 assertNotSuggested('z'); 3761 assertNotSuggested('z');
3761 assertNotSuggested('m'); 3762 assertNotSuggested('m');
3762 }); 3763 });
3763 } 3764 }
3764 3765
3765 test_partFile_TypeName2() { 3766 test_partFile_TypeName2() {
3766 // SimpleIdentifier TypeName ConstructorName 3767 // SimpleIdentifier TypeName ConstructorName
(...skipping 18 matching lines...) Expand all
3785 var m;'''); 3786 var m;''');
3786 computeFast(); 3787 computeFast();
3787 return computeFull((bool result) { 3788 return computeFull((bool result) {
3788 expect(request.replacementOffset, completionOffset); 3789 expect(request.replacementOffset, completionOffset);
3789 expect(request.replacementLength, 0); 3790 expect(request.replacementLength, 0);
3790 // Suggested by ConstructorContributor 3791 // Suggested by ConstructorContributor
3791 assertNotSuggested('A'); 3792 assertNotSuggested('A');
3792 assertSuggestImportedConstructor('Object'); 3793 assertSuggestImportedConstructor('Object');
3793 assertSuggestImportedConstructor('X.c'); 3794 assertSuggestImportedConstructor('X.c');
3794 assertNotSuggested('X._d'); 3795 assertNotSuggested('X._d');
3795 assertSuggestImportedConstructor('B'); 3796 // Suggested by LocalLibraryContributor
3797 assertNotSuggested('B');
3796 assertNotSuggested('F1'); 3798 assertNotSuggested('F1');
3797 assertNotSuggested('T1'); 3799 assertNotSuggested('T1');
3798 assertNotSuggested('_d'); 3800 assertNotSuggested('_d');
3799 assertNotSuggested('z'); 3801 assertNotSuggested('z');
3800 assertNotSuggested('m'); 3802 assertNotSuggested('m');
3801 }); 3803 });
3802 } 3804 }
3803 3805
3804 test_PrefixedIdentifier_class_const() { 3806 test_PrefixedIdentifier_class_const() {
3805 // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block 3807 // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
4667 assertNotSuggested('bar2'); 4669 assertNotSuggested('bar2');
4668 assertNotSuggested('_B'); 4670 assertNotSuggested('_B');
4669 assertSuggestLocalClass('Y'); 4671 assertSuggestLocalClass('Y');
4670 assertSuggestLocalClass('C'); 4672 assertSuggestLocalClass('C');
4671 assertSuggestLocalVariable('f', null); 4673 assertSuggestLocalVariable('f', null);
4672 assertNotSuggested('x'); 4674 assertNotSuggested('x');
4673 assertNotSuggested('e'); 4675 assertNotSuggested('e');
4674 }); 4676 });
4675 } 4677 }
4676 } 4678 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698