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

Unified Diff: pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart

Issue 1834423002: Sort the files in analysis_server (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
index 6efd8ab28192b42b250860efc0929bce26e03518..878fbdb7299cc6669de21512604eb54e4b54d4f6 100644
--- a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
@@ -36,53 +36,6 @@ class StaticMemberContributorTest extends DartCompletionContributorTest {
assertSuggestField('values', 'List<E>', isDeprecated: true);
}
- test_PrefixedIdentifier_class_const() async {
- // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
- addSource(
- '/testB.dart',
- '''
- lib B;
- class I {
- static const scI = 'boo';
- X get f => new A();
- get _g => new A();}
- class B implements I {
- static const int scB = 12;
- var b; X _c;
- X get d => new A();get _e => new A();
- set s1(I x) {} set _s2(I x) {}
- m(X x) {} I _n(X x) {}}
- class X{}''');
- addTestSource('''
- import "/testB.dart";
- class A extends B {
- static const String scA = 'foo';
- w() { }}
- main() {A.^}''');
- await computeSuggestions();
- expect(replacementOffset, completionOffset);
- expect(replacementLength, 0);
- assertSuggestField('scA', 'String');
- assertNotSuggested('scB');
- assertNotSuggested('scI');
- assertNotSuggested('b');
- assertNotSuggested('_c');
- assertNotSuggested('d');
- assertNotSuggested('_e');
- assertNotSuggested('f');
- assertNotSuggested('_g');
- assertNotSuggested('s1');
- assertNotSuggested('_s2');
- assertNotSuggested('m');
- assertNotSuggested('_n');
- assertNotSuggested('a');
- assertNotSuggested('A');
- assertNotSuggested('X');
- assertNotSuggested('w');
- assertNotSuggested('Object');
- assertNotSuggested('==');
- }
-
test_enumConst() async {
addTestSource('enum E { one, two } main() {E.^}');
await computeSuggestions();
@@ -286,4 +239,51 @@ void main() {async.Future.^.w()}''');
await computeSuggestions();
assertSuggestMethod('wait', 'Future', 'Future<dynamic>');
}
+
+ test_PrefixedIdentifier_class_const() async {
+ // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
+ addSource(
+ '/testB.dart',
+ '''
+ lib B;
+ class I {
+ static const scI = 'boo';
+ X get f => new A();
+ get _g => new A();}
+ class B implements I {
+ static const int scB = 12;
+ var b; X _c;
+ X get d => new A();get _e => new A();
+ set s1(I x) {} set _s2(I x) {}
+ m(X x) {} I _n(X x) {}}
+ class X{}''');
+ addTestSource('''
+ import "/testB.dart";
+ class A extends B {
+ static const String scA = 'foo';
+ w() { }}
+ main() {A.^}''');
+ await computeSuggestions();
+ expect(replacementOffset, completionOffset);
+ expect(replacementLength, 0);
+ assertSuggestField('scA', 'String');
+ assertNotSuggested('scB');
+ assertNotSuggested('scI');
+ assertNotSuggested('b');
+ assertNotSuggested('_c');
+ assertNotSuggested('d');
+ assertNotSuggested('_e');
+ assertNotSuggested('f');
+ assertNotSuggested('_g');
+ assertNotSuggested('s1');
+ assertNotSuggested('_s2');
+ assertNotSuggested('m');
+ assertNotSuggested('_n');
+ assertNotSuggested('a');
+ assertNotSuggested('A');
+ assertNotSuggested('X');
+ assertNotSuggested('w');
+ assertNotSuggested('Object');
+ assertNotSuggested('==');
+ }
}

Powered by Google App Engine
This is Rietveld 408576698