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

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

Issue 1505703003: extract StaticMemberContributor from PrefixedElementContributor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 3842 matching lines...) Expand 10 before | Expand all | Expand 10 after
3853 addTestSource(''' 3853 addTestSource('''
3854 import "/testB.dart"; 3854 import "/testB.dart";
3855 class A extends B { 3855 class A extends B {
3856 static const String scA = 'foo'; 3856 static const String scA = 'foo';
3857 w() { }} 3857 w() { }}
3858 main() {A.^}'''); 3858 main() {A.^}''');
3859 computeFast(); 3859 computeFast();
3860 return computeFull((bool result) { 3860 return computeFull((bool result) {
3861 expect(request.replacementOffset, completionOffset); 3861 expect(request.replacementOffset, completionOffset);
3862 expect(request.replacementLength, 0); 3862 expect(request.replacementLength, 0);
3863 assertSuggestInvocationField('scA', 'String'); 3863 // Suggested by StaticMemberContributor
3864 assertSuggestInvocationField('scB', 'int'); 3864 assertNotSuggested('scA');
3865 assertSuggestInvocationField('scI', null); 3865 assertNotSuggested('scB');
3866 assertNotSuggested('scI');
3866 assertNotSuggested('b'); 3867 assertNotSuggested('b');
3867 assertNotSuggested('_c'); 3868 assertNotSuggested('_c');
3868 assertNotSuggested('d'); 3869 assertNotSuggested('d');
3869 assertNotSuggested('_e'); 3870 assertNotSuggested('_e');
3870 assertNotSuggested('f'); 3871 assertNotSuggested('f');
3871 assertNotSuggested('_g'); 3872 assertNotSuggested('_g');
3872 assertNotSuggested('s1'); 3873 assertNotSuggested('s1');
3873 assertNotSuggested('_s2'); 3874 assertNotSuggested('_s2');
3874 assertNotSuggested('m'); 3875 assertNotSuggested('m');
3875 assertNotSuggested('_n'); 3876 assertNotSuggested('_n');
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
4695 assertNotSuggested('bar2'); 4696 assertNotSuggested('bar2');
4696 assertNotSuggested('_B'); 4697 assertNotSuggested('_B');
4697 assertSuggestLocalClass('Y'); 4698 assertSuggestLocalClass('Y');
4698 assertSuggestLocalClass('C'); 4699 assertSuggestLocalClass('C');
4699 assertSuggestLocalVariable('f', null); 4700 assertSuggestLocalVariable('f', null);
4700 assertNotSuggested('x'); 4701 assertNotSuggested('x');
4701 assertNotSuggested('e'); 4702 assertNotSuggested('e');
4702 }); 4703 });
4703 } 4704 }
4704 } 4705 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698