| Index: pkg/analyzer_plugin/test/utilities/completion/type_member_contributor_test.dart
|
| diff --git a/pkg/analyzer_plugin/test/utilities/completion/type_member_contributor_test.dart b/pkg/analyzer_plugin/test/utilities/completion/type_member_contributor_test.dart
|
| index c727a491605229eb8062b1f2914c1d578a384b32..e20842942b10a879c4df97af66eebeb1e4c4e7e1 100644
|
| --- a/pkg/analyzer_plugin/test/utilities/completion/type_member_contributor_test.dart
|
| +++ b/pkg/analyzer_plugin/test/utilities/completion/type_member_contributor_test.dart
|
| @@ -554,10 +554,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';
|
| @@ -654,10 +654,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';
|
| @@ -774,10 +774,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';
|
| @@ -880,10 +880,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';
|
| @@ -986,10 +986,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;}
|
| @@ -1054,7 +1054,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();
|
|
|
| @@ -1127,10 +1127,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';
|
| @@ -1160,7 +1160,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);
|
| @@ -1178,7 +1178,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
|
| @@ -1204,7 +1204,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
|
| @@ -1230,7 +1230,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}''');
|
| @@ -1254,7 +1254,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}''');
|
| @@ -1486,8 +1486,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();
|
| @@ -1517,8 +1517,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();
|
| @@ -1533,7 +1533,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;}
|
| @@ -1554,7 +1554,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;}
|
| @@ -1581,7 +1581,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;}
|
| @@ -1602,7 +1602,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;}
|
| @@ -1629,7 +1629,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;}
|
| @@ -1652,7 +1652,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();
|
| @@ -1678,7 +1678,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();
|
| @@ -1839,7 +1839,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() {}}''');
|
| @@ -1866,7 +1866,7 @@ void main() {new A().f^}''');
|
| B T1;
|
| class B{}''');
|
| addTestSource('''
|
| - import "/testA.dart";
|
| + import "testA.dart";
|
| class C {a() {C ^}}''');
|
| await computeSuggestions();
|
| assertNoSuggestions();
|
| @@ -1877,7 +1877,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();
|
| @@ -1888,7 +1888,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();
|
| @@ -2046,7 +2046,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();
|
| @@ -2077,7 +2077,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();
|
| @@ -2108,7 +2108,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();
|
| @@ -2278,7 +2278,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;}
|
| @@ -2305,7 +2305,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;}
|
| @@ -2326,7 +2326,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() { }
|
| @@ -2370,7 +2370,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();
|
| @@ -2401,7 +2401,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();
|
| @@ -2468,7 +2468,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();
|
| @@ -2544,7 +2544,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();}''');
|
| @@ -2599,7 +2599,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');
|
| @@ -2664,7 +2664,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();
|
| @@ -2693,7 +2693,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();
|
| @@ -2715,7 +2715,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();
|
| @@ -2848,7 +2848,7 @@ void main() {new C().^}''');
|
| static c3() {}
|
| static var c4;}''');
|
| addTestSource('''
|
| - import "/testC.dart";
|
| + import "testC.dart";
|
| class B extends C {
|
| b1() {}
|
| var b2;
|
| @@ -2928,7 +2928,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();
|
| @@ -2958,7 +2958,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();
|
| @@ -2988,7 +2988,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();
|
| @@ -3018,7 +3018,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();
|
| @@ -3220,7 +3220,7 @@ void main() {C.^ print("something");}''');
|
| '/testA.dart',
|
| '''
|
| library libA;
|
| - import "/testB.dart";
|
| + import "testB.dart";
|
| part "$testFile";
|
| class A { }
|
| var m;''');
|
| @@ -3259,7 +3259,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 ^}
|
| @@ -3297,7 +3297,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() { }}
|
| @@ -3342,7 +3342,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);
|
| @@ -3415,7 +3415,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.^}''');
|
| @@ -3443,7 +3443,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) {}''');
|
| @@ -3471,7 +3471,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.^) {}''');
|
| @@ -3499,7 +3499,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);
|
| @@ -3517,7 +3517,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);
|
| @@ -4090,7 +4090,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);
|
| @@ -4117,7 +4117,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);
|
| @@ -4141,7 +4141,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();
|
| @@ -4168,7 +4168,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();
|
| @@ -4195,7 +4195,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() {}}
|
|
|