mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:30:32 +00:00
More test fixed (TBR)
Review-Url: https://codereview.chromium.org/2925163002 .
This commit is contained in:
parent
aecfab68aa
commit
b9529da60e
|
@ -39,7 +39,7 @@ class A {
|
|||
bool foo(int bar, {bool boo, @required int baz}) => false;
|
||||
}''');
|
||||
addTestSource('''
|
||||
import "/testB.dart";
|
||||
import "testB.dart";
|
||||
class B extends A {
|
||||
b() => f^
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class A {
|
|||
Future y() async {return 0;}
|
||||
}''');
|
||||
addTestSource('''
|
||||
import "/testB.dart";
|
||||
import "testB.dart";
|
||||
class B extends A {
|
||||
Future a() async {return 0;}
|
||||
foo() async {await ^}
|
||||
|
@ -89,7 +89,7 @@ class B extends A {
|
|||
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();
|
||||
expect(replacementOffset, completionOffset);
|
||||
|
@ -143,7 +143,7 @@ class A2 {
|
|||
int y2() {return 0;}
|
||||
}''');
|
||||
addTestSource('''
|
||||
import "/testB.dart";
|
||||
import "testB.dart";
|
||||
class A1 {
|
||||
int x;
|
||||
int y() {return 0;}
|
||||
|
@ -194,7 +194,7 @@ class A {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class B extends A {
|
||||
main() {^}
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ class A {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class B extends A {
|
||||
main() {^}
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ class A {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class B extends A {
|
||||
main() {^}
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ class A {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class B extends A {
|
||||
main() {^}
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ class A {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class B extends A {
|
||||
main() {^}
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ class A {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class B extends A {
|
||||
main() {^}
|
||||
}
|
||||
|
@ -442,7 +442,7 @@ class M2 {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class C extends B with M1, M2 {
|
||||
void f() {
|
||||
^
|
||||
|
@ -462,7 +462,7 @@ class A {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class B extends A {
|
||||
main() {^}
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ class A {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class B extends A {
|
||||
main() {^}
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ class A {
|
|||
}
|
||||
''');
|
||||
addTestSource('''
|
||||
import '/libA.dart';
|
||||
import 'libA.dart';
|
||||
class B extends A {
|
||||
main() {^}
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ class B extends A {
|
|||
assertHasNoParameterInfo(suggestion);
|
||||
}
|
||||
|
||||
test_ouside_class() async {
|
||||
test_outside_class() async {
|
||||
resolveSource(
|
||||
'/testB.dart',
|
||||
'''
|
||||
|
@ -522,7 +522,7 @@ class A2 {
|
|||
int y2() {return 0;}
|
||||
}''');
|
||||
addTestSource('''
|
||||
import "/testB.dart";
|
||||
import "testB.dart";
|
||||
class A1 {
|
||||
int x;
|
||||
int y() {return 0;}
|
||||
|
@ -565,7 +565,7 @@ class A2 {
|
|||
int y2() {return 0;}
|
||||
}''');
|
||||
addTestSource('''
|
||||
import "/testB.dart";
|
||||
import "testB.dart";
|
||||
class A1 {
|
||||
int x;
|
||||
int y() {return 0;}
|
||||
|
@ -608,7 +608,7 @@ class A2 {
|
|||
int y2() {return 0;}
|
||||
}''');
|
||||
addTestSource('''
|
||||
import "/testB.dart";
|
||||
import "testB.dart";
|
||||
class A1 {
|
||||
int x;
|
||||
int y() {return 0;}
|
||||
|
|
|
@ -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() {}}
|
||||
|
|
Loading…
Reference in a new issue