| Index: pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
|
| index 200fda7a5b46158cead7d67a683386e2408e5d78..1613079f480d45d84be96305e28ecdb4a7afd906 100644
|
| --- a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
|
| @@ -550,10 +550,10 @@ void main() {new A().f^}''');
|
| int T3;
|
| var _T4;'''); // not imported
|
| addTestSource('''
|
| - import "/testAB.dart";
|
| - import "/testCD.dart" hide D;
|
| - import "/testEEF.dart" show EE;
|
| - import "/testG.dart" as g;
|
| + import "testAB.dart";
|
| + import "testCD.dart" hide D;
|
| + import "testEEF.dart" show EE;
|
| + import "testG.dart" as g;
|
| int T5;
|
| var _T6;
|
| String get T7 => 'hello';
|
| @@ -650,10 +650,10 @@ void main() {new A().f^}''');
|
| int T3;
|
| var _T4;'''); // not imported
|
| addTestSource('''
|
| - import "/testAB.dart";
|
| - import "/testCD.dart" hide D;
|
| - import "/testEEF.dart" show EE;
|
| - import "/testG.dart" as g;
|
| + import "testAB.dart";
|
| + import "testCD.dart" hide D;
|
| + import "testEEF.dart" show EE;
|
| + import "testG.dart" as g;
|
| int T5;
|
| var _T6;
|
| String get T7 => 'hello';
|
| @@ -770,10 +770,10 @@ void main() {new A().f^}''');
|
| int T3;
|
| var _T4;'''); // not imported
|
| addTestSource('''
|
| - import "/testAB.dart";
|
| - import "/testCD.dart" hide D;
|
| - import "/testEEF.dart" show EE;
|
| - import "/testG.dart" as g;
|
| + import "testAB.dart";
|
| + import "testCD.dart" hide D;
|
| + import "testEEF.dart" show EE;
|
| + import "testG.dart" as g;
|
| int T5;
|
| var _T6;
|
| String get T7 => 'hello';
|
| @@ -876,10 +876,10 @@ void main() {new A().f^}''');
|
| int T3;
|
| var _T4;'''); // not imported
|
| addTestSource('''
|
| - import "/testAB.dart";
|
| - import "/testCD.dart" hide D;
|
| - import "/testEEF.dart" show EE;
|
| - import "/testG.dart" as g;
|
| + import "testAB.dart";
|
| + import "testCD.dart" hide D;
|
| + import "testEEF.dart" show EE;
|
| + import "testG.dart" as g;
|
| int T5;
|
| var _T6;
|
| String get T7 => 'hello';
|
| @@ -982,10 +982,10 @@ void main() {new A().f^}''');
|
| int T3;
|
| var _T4;'''); // not imported
|
| addTestSource('''
|
| - import "/testAB.dart";
|
| - import "/testCD.dart" hide D;
|
| - import "/testEEF.dart" show EE;
|
| - import "/testG.dart" as g;
|
| + import "testAB.dart";
|
| + import "testCD.dart" hide D;
|
| + import "testEEF.dart" show EE;
|
| + import "testG.dart" as g;
|
| int T5;
|
| var _T6;
|
| Z D2() {int x;}
|
| @@ -1050,7 +1050,7 @@ void main() {new A().f^}''');
|
| class I { int i1; i2() { } }
|
| class M { var m1; int m2() { } }''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| class A extends E implements I with M {a() {^}}''');
|
| await computeSuggestions();
|
|
|
| @@ -1123,10 +1123,10 @@ void main() {new A().f^}''');
|
| int T3;
|
| var _T4;'''); // not imported
|
| addTestSource('''
|
| - import "/testAB.dart";
|
| - import "/testCD.dart" hide D;
|
| - import "/testEEF.dart" show EE;
|
| - import "/testG.dart" as g;
|
| + import "testAB.dart";
|
| + import "testCD.dart" hide D;
|
| + import "testEEF.dart" show EE;
|
| + import "testG.dart" as g;
|
| int T5;
|
| var _T6;
|
| String get T7 => 'hello';
|
| @@ -1156,7 +1156,7 @@ void main() {new A().f^}''');
|
| addPackageSource('myBar', 'bar.dart', 'class Foo2 { Foo2() { } }');
|
| addSource(
|
| '/proj/testAB.dart', 'import "package:myBar/bar.dart"; class Foo { }');
|
| - testFile = '/proj/completionTest.dart';
|
| + testFile = provider.convertPath('/proj/completionTest.dart');
|
| addTestSource('class C {foo(){F^}}');
|
| await computeSuggestions();
|
| expect(replacementOffset, completionOffset - 1);
|
| @@ -1174,7 +1174,7 @@ void main() {new A().f^}''');
|
| '''
|
| class B { }''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| class A {var b; X _c;}
|
| class X{}
|
| // looks like a cascade to the parser
|
| @@ -1200,7 +1200,7 @@ void main() {new A().f^}''');
|
| '''
|
| class B { }''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| class A {var b; X _c;}
|
| class X{}
|
| // looks like a cascade to the parser
|
| @@ -1226,7 +1226,7 @@ void main() {new A().f^}''');
|
| '''
|
| class B { }''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| class A {var b; X _c;}
|
| class X{}
|
| main() {A a; a..^z}''');
|
| @@ -1250,7 +1250,7 @@ void main() {new A().f^}''');
|
| '''
|
| class B { }''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| class A {var b; X _c;}
|
| class X{}
|
| main() {A a; a..^ return}''');
|
| @@ -1482,8 +1482,8 @@ void main() {new A().f^}''');
|
| class C { }
|
| class D { }''');
|
| addTestSource('''
|
| - import "/testAB.dart" hide ^;
|
| - import "/testCD.dart";
|
| + import "testAB.dart" hide ^;
|
| + import "testCD.dart";
|
| class X {}''');
|
| await computeSuggestions();
|
| assertNoSuggestions();
|
| @@ -1513,8 +1513,8 @@ void main() {new A().f^}''');
|
| class C { }
|
| class D { }''');
|
| addTestSource('''
|
| - import "/testAB.dart" show ^;
|
| - import "/testCD.dart";
|
| + import "testAB.dart" show ^;
|
| + import "testCD.dart";
|
| class X {}''');
|
| await computeSuggestions();
|
| assertNoSuggestions();
|
| @@ -1529,7 +1529,7 @@ void main() {new A().f^}''');
|
| F1() { }
|
| class A {int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| class B {int x;}
|
| @@ -1550,7 +1550,7 @@ void main() {new A().f^}''');
|
| F1() { }
|
| class A {int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| class B {int x;}
|
| @@ -1577,7 +1577,7 @@ void main() {new A().f^}''');
|
| F1() { }
|
| class A {int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| class B {int x;}
|
| @@ -1598,7 +1598,7 @@ void main() {new A().f^}''');
|
| F1() { }
|
| class A {int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| class B {int x;}
|
| @@ -1625,7 +1625,7 @@ void main() {new A().f^}''');
|
| F1() { }
|
| class A {int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| class B {int x;}
|
| @@ -1648,7 +1648,7 @@ void main() {new A().f^}''');
|
| F1() { }
|
| class X {X.c(); X._d(); z() {}}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| var m;
|
| main() {new X.^}''');
|
| await computeSuggestions();
|
| @@ -1674,7 +1674,7 @@ void main() {new A().f^}''');
|
| F1() { }
|
| class X {factory X.c(); factory X._d(); z() {}}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| var m;
|
| main() {new X.^}''');
|
| await computeSuggestions();
|
| @@ -1835,7 +1835,7 @@ void main() {new A().f^}''');
|
| class A {int x;}
|
| class _B { }''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| typedef int F2(int blat);
|
| class Clz = Object with Object;
|
| class C {foo(){^} void bar() {}}''');
|
| @@ -1862,7 +1862,7 @@ void main() {new A().f^}''');
|
| B T1;
|
| class B{}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| class C {a() {C ^}}''');
|
| await computeSuggestions();
|
| assertNoSuggestions();
|
| @@ -1873,7 +1873,7 @@ void main() {new A().f^}''');
|
| // FieldDeclaration
|
| addSource('/testA.dart', 'class A { }');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| class C {A ^}''');
|
| await computeSuggestions();
|
| assertNoSuggestions();
|
| @@ -1884,7 +1884,7 @@ void main() {new A().f^}''');
|
| // FieldDeclaration
|
| addSource('/testA.dart', 'class A { }');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| class C {var ^}''');
|
| await computeSuggestions();
|
| assertNoSuggestions();
|
| @@ -2042,7 +2042,7 @@ void main() {new A().f^}''');
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2073,7 +2073,7 @@ void main() {new A().f^}''');
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2104,7 +2104,7 @@ void main() {new A().f^}''');
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2274,7 +2274,7 @@ void f(C<int> c) {
|
| F1() { }
|
| class A {int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| class B {int x;}
|
| @@ -2301,7 +2301,7 @@ void f(C<int> c) {
|
| F1() { }
|
| class A {int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| class B {int x;}
|
| @@ -2322,7 +2322,7 @@ void f(C<int> c) {
|
| F1() { }
|
| class A {A(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| import "dart:async";
|
| int T2;
|
| F2() { }
|
| @@ -2366,7 +2366,7 @@ void f(C<int> c) {
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2397,7 +2397,7 @@ void f(C<int> c) {
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2464,7 +2464,7 @@ void f(C<int> c) {
|
| foo() { }
|
| class X {X.c(); X._d(); z() {}}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| class Y {Y.c(); Y._d(); z() {}}
|
| main() {var x; if (x is ^) { }}''');
|
| await computeSuggestions();
|
| @@ -2540,7 +2540,7 @@ void f(C<int> c) {
|
| nowIsIt() { }
|
| class X {factory X.c(); factory X._d(); z() {}}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| String newer() {}
|
| var m;
|
| main() {new^ X.c();}''');
|
| @@ -2595,7 +2595,7 @@ void f(C<int> c) {
|
| test_libraryPrefix_with_exports() async {
|
| addSource('/libA.dart', 'library libA; class A { }');
|
| addSource('/libB.dart', 'library libB; export "/libA.dart"; class B { }');
|
| - addTestSource('import "/libB.dart" as foo; main() {foo.^} class C { }');
|
| + addTestSource('import "libB.dart" as foo; main() {foo.^} class C { }');
|
| await computeSuggestions();
|
| // Suggested by LibraryMemberContributor
|
| assertNotSuggested('B');
|
| @@ -2660,7 +2660,7 @@ void f(C<int> c) {
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2689,7 +2689,7 @@ void f(C<int> c) {
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2711,7 +2711,7 @@ void f(C<int> c) {
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2844,7 +2844,7 @@ void main() {new C().^}''');
|
| static c3() {}
|
| static var c4;}''');
|
| addTestSource('''
|
| - import "/testC.dart";
|
| + import "testC.dart";
|
| class B extends C {
|
| b1() {}
|
| var b2;
|
| @@ -2924,7 +2924,7 @@ void main() {new C().^}''');
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2954,7 +2954,7 @@ void main() {new C().^}''');
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -2984,7 +2984,7 @@ void main() {new C().^}''');
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -3014,7 +3014,7 @@ void main() {new C().^}''');
|
| typedef D1();
|
| class C1 {C1(this.x) { } int x;}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| int T2;
|
| F2() { }
|
| typedef D2();
|
| @@ -3216,7 +3216,7 @@ void main() {C.^ print("something");}''');
|
| '/testA.dart',
|
| '''
|
| library libA;
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| part "$testFile";
|
| class A { }
|
| var m;''');
|
| @@ -3255,7 +3255,7 @@ void main() {C.^ print("something");}''');
|
| class B { }''');
|
| addTestSource('''
|
| library libA;
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| part "/testA.dart";
|
| class A { A({String boo: 'hoo'}) { } }
|
| main() {new ^}
|
| @@ -3293,7 +3293,7 @@ void main() {C.^ print("something");}''');
|
| m(X x) {} I _n(X x) {}}
|
| class X{}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| class A extends B {
|
| static const String scA = 'foo';
|
| w() { }}
|
| @@ -3338,7 +3338,7 @@ void main() {C.^ print("something");}''');
|
| m(X x) {} I _n(X x) {}}
|
| class X{}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| main() {A a; a.^}''');
|
| await computeSuggestions();
|
| expect(replacementOffset, completionOffset);
|
| @@ -3411,7 +3411,7 @@ void main() {C.^ print("something");}''');
|
| class X { }
|
| class Y { }''');
|
| addTestSource('''
|
| - import "/testB.dart" as b;
|
| + import "testB.dart" as b;
|
| var T2;
|
| class A { }
|
| main() {b.^}''');
|
| @@ -3439,7 +3439,7 @@ void main() {C.^ print("something");}''');
|
| class X { }
|
| class Y { }''');
|
| addTestSource('''
|
| - import "/testB.dart" as b;
|
| + import "testB.dart" as b;
|
| var T2;
|
| class A { }
|
| foo(b.^ f) {}''');
|
| @@ -3467,7 +3467,7 @@ void main() {C.^ print("something");}''');
|
| class X { }
|
| class Y { }''');
|
| addTestSource('''
|
| - import "/testB.dart" as b;
|
| + import "testB.dart" as b;
|
| var T2;
|
| class A { }
|
| foo(b.^) {}''');
|
| @@ -3495,7 +3495,7 @@ void main() {C.^ print("something");}''');
|
| class X extends _W {}
|
| class M{}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| foo(X x) {x.^}''');
|
| await computeSuggestions();
|
| expect(replacementOffset, completionOffset);
|
| @@ -3513,7 +3513,7 @@ void main() {C.^ print("something");}''');
|
| class A {static int bar = 10;}
|
| _B() {}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| class X {foo(){A^.bar}}''');
|
| await computeSuggestions();
|
| expect(replacementOffset, completionOffset - 1);
|
| @@ -4085,7 +4085,7 @@ class C1 extends C2 implements C3 {
|
| F1() => 0;
|
| typedef String T1(int blat);''');
|
| addTestSource('''
|
| - import "/testA.dart";'
|
| + import "testA.dart";'
|
| class C2 {int x;}
|
| F2() => 0;
|
| typedef int T2(int blat);
|
| @@ -4112,7 +4112,7 @@ class C1 extends C2 implements C3 {
|
| F1() => 0;
|
| typedef String T1(int blat);''');
|
| addTestSource('''
|
| - import "/testA.dart";'
|
| + import "testA.dart";'
|
| class C2 {int x;}
|
| F2() => 0;
|
| typedef int T2(int blat);
|
| @@ -4136,7 +4136,7 @@ class C1 extends C2 implements C3 {
|
| class _B { }
|
| class X {X.c(); X._d(); z() {}}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| class Y {Y.c(); Y._d(); z() {}}
|
| main() {var ^}''');
|
| await computeSuggestions();
|
| @@ -4163,7 +4163,7 @@ class C1 extends C2 implements C3 {
|
| class _B { }
|
| class X {X.c(); X._d(); z() {}}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| class Y {Y.c(); Y._d(); z() {}}
|
| class C {bar(){var f; {var x;} var e = ^}}''');
|
| await computeSuggestions();
|
| @@ -4190,7 +4190,7 @@ class C1 extends C2 implements C3 {
|
| class _B { }
|
| class X {X.c(); X._d(); z() {}}''');
|
| addTestSource('''
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| foo2() { }
|
| void bar2() { }
|
| class Y {Y.c(); Y._d(); z() {}}
|
|
|