Skip to content

Commit 71d1744

Browse files
committed
Test Fixes
* remove abstract modifier on insertion * use semi-colon to delimit object types * remove bad type param
1 parent b7b30aa commit 71d1744

9 files changed

+38
-11
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
//// abstract class A<T> {
4+
//// abstract f<T>();
5+
//// }
6+
////
7+
//// class C<U> extends A<U> {[|
8+
//// |]}
9+
10+
verify.rangeAfterCodeFix(`f<U>(){
11+
throw new Error('Method not Implemented');
12+
}
13+
`);

tests/cases/fourslash/codeFixClassExtendsAbstractProperty.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
//// |]}
99

1010
verify.rangeAfterCodeFix(`
11-
abstract x: number;
11+
x: number;
1212
`);

tests/cases/fourslash/codeFixClassExtendsAbstractProtectedProperty.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
//// |]}
99

1010
verify.rangeAfterCodeFix(`
11-
protected abstract x: number;
11+
protected x: number;
1212
`);

tests/cases/fourslash/codeFixClassExtendsAbstractPublicProperty.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
//// |]}
99

1010
verify.rangeAfterCodeFix(`
11-
public abstract x: number;
11+
public x: number;
1212
`);

tests/cases/fourslash/codeFixUnImplementedClassMissingAbstractProperty.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/// <reference path='fourslash.ts' />
22

3-
//// abstract class C1 {
3+
//// abstract class A {
44
//// abstract x: number;
55
//// }
66
////
7-
//// class C3 implements C2 {[| |]}
7+
//// class C implements A {[| |]}
88

99
verify.rangeAfterCodeFix(`
1010
x: number;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
//// interface I {
4+
//// f1(): string;
5+
//// }
6+
////
7+
//// class C implements I {[|
8+
//// |]}
9+
10+
verify.rangeAfterCodeFix(`f1(): string {
11+
throw new Error('Method not Implemented');
12+
}
13+
`);

tests/cases/fourslash/codeFixUnImplementedInterfaceMissingPropertyIntersection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
//// |]}
99

1010
verify.rangeAfterCodeFix(`
11-
x: number & { __iBrand: any }
11+
x: number & { __iBrand: any; };
1212
`);

tests/cases/fourslash/codeFixUnImplementedInterfaceSomePropertiesPresent.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
//// y: number;
66
//// }
77
////
8-
//// class C2 implements C {[| |]
9-
//// x: number
10-
//// }
8+
//// class C2 implements I {[|
9+
//// x: number;
10+
//// |]}
1111

1212
verify.rangeAfterCodeFix(`
1313
y: number;
14+
x: number;
1415
`);

tests/cases/fourslash/codeFixUnimplementedInterfaceTypeParamInstantiateDeeply.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface I<T> {
1111
x: { y: T, z: T[] };
1212
}
1313
14-
class C<number> implements I<number> {
15-
x: { y: number, z: number[] };
14+
class C implements I<number> {
15+
x: { y: number; z: number[]; };
1616
}
1717
`);

0 commit comments

Comments
 (0)