diff --git a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart index 221c8f4f13613..a50aa26d2d3b8 100644 --- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart +++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart @@ -1494,7 +1494,7 @@ class B extends A { // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; - part '/partAB.dart'; + part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -1518,7 +1518,7 @@ class B extends A { // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; - part '/partAB.dart'; + part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -3615,7 +3615,7 @@ class B extends A { addTestSource(''' library libA; import "${convertPathForImport('/testB.dart')}"; - part "/testA.dart"; + part "testA.dart"; class A { A({String boo: 'hoo'}) { } } main() {new ^} var m;'''); diff --git a/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart index c7d0db8e1e7f2..070aeeda4a757 100644 --- a/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart +++ b/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart @@ -62,10 +62,10 @@ class H { } 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'; @@ -109,10 +109,10 @@ class H { } 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'; @@ -156,10 +156,10 @@ class H { } 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'; @@ -278,7 +278,7 @@ class A {foo(){var f; {var x;}}} class B {B(this.x, [String boo]) { } int x;} class C {C.bar({boo: 'hoo', int z: 0}) { } }'''); addTestSource(''' -import "/testA.dart" as t; +import "testA.dart" as t; import "dart:math" as math; main() {new ^ String x = "hello";}'''); await computeSuggestions(); @@ -317,7 +317,7 @@ class B {B(this.x, [String boo]) { } int x;} class C {C.bar({boo: 'hoo', int z: 0}) { } }'''); addSource('/testB.dart', ''' library testB; -import "/testA.dart" as t; +import "testA.dart" as t; import "dart:math" as math; //part "$testFile" main() {new ^ String x = "hello";}'''); diff --git a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart index f94eeb5398f55..206dde97bd978 100644 --- a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart +++ b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart @@ -80,7 +80,7 @@ library A; bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' -import '/libA.dart'; +import 'libA.dart'; class B { } String bar() => true; void main() {expect(^)}'''); @@ -111,7 +111,7 @@ bool hasLength(int expected) { } expect(arg) { } void baz() { }'''); addTestSource(''' -import '/libA.dart' +import 'libA.dart' class B { } String bar() => true; void main() {expect(^)}'''); @@ -143,7 +143,7 @@ bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' import 'dart:async'; -import '/libA.dart'; +import 'libA.dart'; class B { } String bar() => true; void main() {new A(^)}'''); @@ -177,7 +177,7 @@ bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' import 'dart:async'; -import '/libA.dart'; +import 'libA.dart'; class B { } String bar() => true; void main() {new A(^)}'''); @@ -208,7 +208,7 @@ library A; bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' -import '/libA.dart' +import 'libA.dart' expect(arg) { } class B { } String bar() => true; @@ -239,7 +239,7 @@ library A; bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' -import '/libA.dart' +import 'libA.dart' class B { expect(arg) { } void foo() {expect(^)}} @@ -272,7 +272,7 @@ bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' import 'dart:async'; -import '/libA.dart'; +import 'libA.dart'; class B { } String bar(f()) => true; void main() {bar(^);}'''); @@ -305,7 +305,7 @@ bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' import 'dart:async'; -import '/libA.dart'; +import 'libA.dart'; class B { String bar(f()) => true; } void main() {new B().bar(^);}'''); await computeSuggestions(); @@ -334,7 +334,7 @@ void main() {new B().bar(^);}'''); library A; bool hasLength(int expected) { }'''); addTestSource(''' -import '/libA.dart' +import 'libA.dart' String bar() => true; void main() {expect(foo: ^)}'''); await computeSuggestions(); @@ -565,10 +565,10 @@ class H { } 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'; @@ -663,10 +663,10 @@ class H { } 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'; @@ -776,10 +776,10 @@ class H { } 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'; @@ -875,10 +875,10 @@ class H { } 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'; @@ -974,10 +974,10 @@ class D3 { } 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;} @@ -1045,7 +1045,7 @@ class E extends F { var e1; e2() { } } 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(); @@ -1111,10 +1111,10 @@ class H { } 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'; @@ -1163,7 +1163,7 @@ class Z { }'''); addSource('/testB.dart', ''' class B { }'''); addTestSource(''' -import "/testB.dart"; +import "testB.dart"; class A {var b; X _c;} class X{} // looks like a cascade to the parser @@ -1188,7 +1188,7 @@ main() {A a; a.^.z}'''); addSource('/testB.dart', ''' class B { }'''); addTestSource(''' -import "/testB.dart"; +import "testB.dart"; class A {var b; X _c;} class X{} main() {A a; a..^z}'''); @@ -1211,7 +1211,7 @@ main() {A a; a..^z}'''); addSource('/testB.dart', ''' class B { }'''); addTestSource(''' -import "/testB.dart"; +import "testB.dart"; class A {var b; X _c;} class X{} main() {A a; a..^ return}'''); @@ -1436,7 +1436,7 @@ A T;'''); // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; -part '/partAB.dart'; +part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -1448,8 +1448,8 @@ class PB { }'''); class C { } class D { }'''); addTestSource(''' -import "/testAB.dart" hide ^; -import "/testCD.dart"; +import "testAB.dart" hide ^; +import "testCD.dart"; class X {}'''); await computeSuggestions(); @@ -1460,7 +1460,7 @@ class X {}'''); // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; -part '/partAB.dart'; +part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -1474,8 +1474,8 @@ class PB { }'''); class C { } class D { }'''); addTestSource(''' -import "/testAB.dart" show ^; -import "/testCD.dart"; +import "testAB.dart" show ^; +import "testCD.dart"; class X {}'''); await computeSuggestions(); @@ -1489,7 +1489,7 @@ int T1; F1() { } class A {int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } class B {int x;} @@ -1509,7 +1509,7 @@ int T1; F1() { } class A {int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } class B {int x;} @@ -1539,7 +1539,7 @@ int T1; F1() { } class A {int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } class B {int x;} @@ -1559,7 +1559,7 @@ int T1; F1() { } class A {int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } class B {int x;} @@ -1589,7 +1589,7 @@ int T1; F1() { } class A {int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } class B {int x;} @@ -1646,7 +1646,7 @@ int T1; F1() { } class X {X.c(); X._d(); z() {}}'''); addTestSource(''' -import "/testB.dart"; +import "testB.dart"; var m; main() {new X.^}'''); await computeSuggestions(); @@ -1671,7 +1671,7 @@ int T1; F1() { } class X {factory X.c(); factory X._d(); z() {}}'''); addTestSource(''' -import "/testB.dart"; +import "testB.dart"; var m; main() {new X.^}'''); await computeSuggestions(); @@ -1792,7 +1792,7 @@ _B F1() { } 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() {}}'''); @@ -1821,7 +1821,7 @@ class C {foo(){^} void bar() {}}'''); B T1; class B{}'''); addTestSource(''' - import "/testA.dart"; + import "testA.dart"; class C {a() {C ^}}'''); await computeSuggestions(); @@ -1833,7 +1833,7 @@ class C {foo(){^} void bar() {}}'''); // FieldDeclaration addSource('/testA.dart', 'class A { }'); addTestSource(''' - import "/testA.dart"; + import "testA.dart"; class C {A ^}'''); await computeSuggestions(); @@ -1845,7 +1845,7 @@ class C {foo(){^} void bar() {}}'''); // FieldDeclaration addSource('/testA.dart', 'class A { }'); addTestSource(''' - import "/testA.dart"; + import "testA.dart"; class C {var ^}'''); await computeSuggestions(); @@ -2081,7 +2081,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -2111,7 +2111,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -2141,7 +2141,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -2307,7 +2307,7 @@ int T1; F1() { } class A {int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } class B {int x;} @@ -2337,7 +2337,7 @@ int T1; F1() { } class A {int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } class B {int x;} @@ -2471,7 +2471,7 @@ int T1; F1() { } class A {A(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; import "dart:async"; int T2; F2() { } @@ -2591,7 +2591,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -2625,7 +2625,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -2700,7 +2700,7 @@ lib B; 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(); @@ -2775,7 +2775,7 @@ int T1; 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();}'''); @@ -2836,7 +2836,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -2869,7 +2869,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -2891,7 +2891,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -3004,7 +3004,7 @@ class C { static c3() {} static var c4;}'''); addTestSource(''' -import "/testC.dart"; +import "testC.dart"; class B extends C { b1() {} var b2; @@ -3087,7 +3087,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -3116,7 +3116,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -3145,7 +3145,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -3174,7 +3174,7 @@ F1() { } typedef D1(); class C1 {C1(this.x) { } int x;}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; int T2; F2() { } typedef D2(); @@ -3283,8 +3283,8 @@ F1() { } class X {X.c(); X._d(); z() {}}'''); addSource('/testA.dart', ''' library libA; -import "/testB.dart"; -part "$testFile"; +import "testB.dart"; +part "${resourceProvider.pathContext.basename(testFile)}"; class A { } var m;'''); addTestSource(''' @@ -3320,8 +3320,8 @@ part of libA; class B { }'''); addTestSource(''' library libA; -import "/testB.dart"; -part "/testA.dart"; +import "testB.dart"; +part "testA.dart"; class A { A({String boo: 'hoo'}) { } } main() {new ^} var m;'''); @@ -3357,7 +3357,7 @@ class B implements I { 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() { }} @@ -3401,7 +3401,7 @@ class A implements I { m(X x) {} I _n(X x) {}} class X{}'''); addTestSource(''' -import "/testB.dart"; +import "testB.dart"; main() {A a; a.^}'''); await computeSuggestions(); @@ -3475,7 +3475,7 @@ var T1; class X { } class Y { }'''); addTestSource(''' -import "/testB.dart" as b; +import "testB.dart" as b; var T2; class A { } main() {b.^}'''); @@ -3502,7 +3502,7 @@ var T1; class X { } class Y { }'''); addTestSource(''' -import "/testB.dart" as b; +import "testB.dart" as b; var T2; class A { } foo(b.^ f) {}'''); @@ -3529,7 +3529,7 @@ var T1; class X { } class Y { }'''); addTestSource(''' -import "/testB.dart" as b; +import "testB.dart" as b; var T2; class A { } foo(b.^) {}'''); @@ -3556,7 +3556,7 @@ class _W {M y; var _z;} class X extends _W {} class M{}'''); addTestSource(''' -import "/testB.dart"; +import "testB.dart"; foo(X x) {x.^}'''); await computeSuggestions(); @@ -3573,7 +3573,7 @@ foo(X x) {x.^}'''); class A {static int bar = 10;} _B() {}'''); addTestSource(''' -import "/testA.dart"; +import "testA.dart"; class X {foo(){A^.bar}}'''); await computeSuggestions(); @@ -4050,7 +4050,7 @@ class C1 {int x;} 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); @@ -4076,7 +4076,7 @@ class C1 {int x;} 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); @@ -4099,7 +4099,7 @@ foo() { } 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(); @@ -4126,7 +4126,7 @@ foo() { } 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(); @@ -4156,7 +4156,7 @@ void bar1() { } 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() {}} diff --git a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart index 7ec29ebb8706b..bec8f09f588ba 100644 --- a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart +++ b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart @@ -1713,7 +1713,7 @@ A T;'''); // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; -part '/partAB.dart'; +part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -1737,7 +1737,7 @@ class X {}'''); // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; -part '/partAB.dart'; +part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -3779,8 +3779,8 @@ F1() { } class X {X.c(); X._d(); z() {}}'''); addSource('/testA.dart', ''' library libA; -import "${convertPathForImport("/testB.dart")}"; -part "$testFile"; +import "testB.dart"; +part "${resourceProvider.pathContext.basename(testFile)}"; class A { } var m;'''); addTestSource(''' @@ -3816,8 +3816,8 @@ part of libA; class B { }'''); addTestSource(''' library libA; -import "${convertPathForImport("/testB.dart")}"; -part "/testA.dart"; +import "testB.dart"; +part "testA.dart"; class A { A({String boo: 'hoo'}) { } } main() {new ^} var m;'''); 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 0d990736e3ed8..d6266bab1ff6a 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 @@ -119,7 +119,7 @@ void main() {new A().f^}'''); bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' - import '/libA.dart'; + import 'libA.dart'; class B { } String bar() => true; void main() {expect(^)}'''); @@ -145,7 +145,7 @@ void main() {new A().f^}'''); expect(arg) { } void baz() { }'''); addTestSource(''' - import '/libA.dart' + import 'libA.dart' class B { } String bar() => true; void main() {expect(^)}'''); @@ -172,7 +172,7 @@ void main() {new A().f^}'''); void baz() { }'''); addTestSource(''' import 'dart:async'; - import '/libA.dart'; + import 'libA.dart'; class B { } String bar() => true; void main() {new A(^)}'''); @@ -201,7 +201,7 @@ void main() {new A().f^}'''); void baz() { }'''); addTestSource(''' import 'dart:async'; - import '/libA.dart'; + import 'libA.dart'; class B { } String bar() => true; void main() {new A(^)}'''); @@ -227,7 +227,7 @@ void main() {new A().f^}'''); bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' - import '/libA.dart' + import 'libA.dart' expect(arg) { } class B { } String bar() => true; @@ -253,7 +253,7 @@ void main() {new A().f^}'''); bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' - import '/libA.dart' + import 'libA.dart' class B { expect(arg) { } void foo() {expect(^)}} @@ -281,7 +281,7 @@ void main() {new A().f^}'''); void baz() { }'''); addTestSource(''' import 'dart:async'; - import '/libA.dart'; + import 'libA.dart'; class B { } String bar(f()) => true; void main() {bar(^);}'''); @@ -309,7 +309,7 @@ void main() {new A().f^}'''); void baz() { }'''); addTestSource(''' import 'dart:async'; - import '/libA.dart'; + import 'libA.dart'; class B { String bar(f()) => true; } void main() {new B().bar(^);}'''); await computeSuggestions(); @@ -333,7 +333,7 @@ void main() {new A().f^}'''); library A; bool hasLength(int expected) { }'''); addTestSource(''' - import '/libA.dart' + import 'libA.dart' String bar() => true; void main() {expect(foo: ^)}'''); await computeSuggestions(); @@ -1377,7 +1377,7 @@ void main() {new A().f^}'''); // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; - part '/partAB.dart'; + part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -1400,7 +1400,7 @@ void main() {new A().f^}'''); // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; - part '/partAB.dart'; + part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -2457,7 +2457,7 @@ void f(C c) { test_libraryPrefix_with_exports() async { addSource('/libA.dart', 'library libA; class A { }'); - addSource('/libB.dart', 'library libB; export "/libA.dart"; class B { }'); + addSource('/libB.dart', 'library libB; export "libA.dart"; class B { }'); addTestSource('import "libB.dart" as foo; main() {foo.^} class C { }'); await computeSuggestions(); // Suggested by LibraryMemberContributor @@ -3060,7 +3060,7 @@ void main() {C.^ print("something");}'''); addSource('/testA.dart', ''' library libA; import "testB.dart"; - part "$testFile"; + part "${resourceProvider.pathContext.basename(testFile)}"; class A { } var m;'''); addTestSource(''' @@ -3095,7 +3095,7 @@ void main() {C.^ print("something");}'''); addTestSource(''' library libA; import "testB.dart"; - part "/testA.dart"; + part "${convertPathForImport('/testA.dart')}"; class A { A({String boo: 'hoo'}) { } } main() {new ^} var m;'''); 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 f410bb076ef11..74b4392ddeac8 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 @@ -122,7 +122,7 @@ void main() {new A().f^}'''); bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' - import '/libA.dart'; + import 'libA.dart'; class B { } String bar() => true; void main() {expect(^)}'''); @@ -148,7 +148,7 @@ void main() {new A().f^}'''); expect(arg) { } void baz() { }'''); addTestSource(''' - import '/libA.dart' + import 'libA.dart' class B { } String bar() => true; void main() {expect(^)}'''); @@ -175,7 +175,7 @@ void main() {new A().f^}'''); void baz() { }'''); addTestSource(''' import 'dart:async'; - import '/libA.dart'; + import 'libA.dart'; class B { } String bar() => true; void main() {new A(^)}'''); @@ -204,7 +204,7 @@ void main() {new A().f^}'''); void baz() { }'''); addTestSource(''' import 'dart:async'; - import '/libA.dart'; + import 'libA.dart'; class B { } String bar() => true; void main() {new A(^)}'''); @@ -230,7 +230,7 @@ void main() {new A().f^}'''); bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' - import '/libA.dart' + import 'libA.dart' expect(arg) { } class B { } String bar() => true; @@ -256,7 +256,7 @@ void main() {new A().f^}'''); bool hasLength(int expected) { } void baz() { }'''); addTestSource(''' - import '/libA.dart' + import 'libA.dart' class B { expect(arg) { } void foo() {expect(^)}} @@ -284,7 +284,7 @@ void main() {new A().f^}'''); void baz() { }'''); addTestSource(''' import 'dart:async'; - import '/libA.dart'; + import 'libA.dart'; class B { } String bar(f()) => true; void main() {bar(^);}'''); @@ -312,7 +312,7 @@ void main() {new A().f^}'''); void baz() { }'''); addTestSource(''' import 'dart:async'; - import '/libA.dart'; + import 'libA.dart'; class B { String bar(f()) => true; } void main() {new B().bar(^);}'''); await computeSuggestions(); @@ -336,7 +336,7 @@ void main() {new A().f^}'''); library A; bool hasLength(int expected) { }'''); addTestSource(''' - import '/libA.dart' + import 'libA.dart' String bar() => true; void main() {expect(foo: ^)}'''); await computeSuggestions(); @@ -1380,7 +1380,7 @@ void main() {new A().f^}'''); // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; - part '/partAB.dart'; + part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -1403,7 +1403,7 @@ void main() {new A().f^}'''); // SimpleIdentifier HideCombinator ImportDirective addSource('/testAB.dart', ''' library libAB; - part '/partAB.dart'; + part 'partAB.dart'; class A { } class B { }'''); addSource('/partAB.dart', ''' @@ -2460,7 +2460,7 @@ void f(C c) { test_libraryPrefix_with_exports() async { addSource('/libA.dart', 'library libA; class A { }'); - addSource('/libB.dart', 'library libB; export "/libA.dart"; class B { }'); + addSource('/libB.dart', 'library libB; export "libA.dart"; class B { }'); addTestSource('import "libB.dart" as foo; main() {foo.^} class C { }'); await computeSuggestions(); // Suggested by LibraryMemberContributor @@ -3098,7 +3098,7 @@ void main() {C.^ print("something");}'''); addTestSource(''' library libA; import "testB.dart"; - part "/testA.dart"; + part "testA.dart"; class A { A({String boo: 'hoo'}) { } } main() {new ^} var m;''');