mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-13 05:37:13 -05:00
Update undeclared method quickfix tests
This commit is contained in:
@@ -14,13 +14,13 @@ verify.codeFixAll({
|
||||
newFileContent:
|
||||
`class C {
|
||||
x: number;
|
||||
y(): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
method() {
|
||||
this.x = 0;
|
||||
this.y();
|
||||
this.x = "";
|
||||
}
|
||||
y(): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}`,
|
||||
});
|
||||
|
||||
@@ -18,9 +18,6 @@ verify.codeFixAll({
|
||||
fixAllDescription: "Add all missing members",
|
||||
newFileContent:
|
||||
`class C {
|
||||
y() {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
constructor() {
|
||||
this.x = undefined;
|
||||
}
|
||||
@@ -29,5 +26,8 @@ verify.codeFixAll({
|
||||
this.y();
|
||||
this.x;
|
||||
}
|
||||
y() {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}`,
|
||||
});
|
||||
|
||||
@@ -14,15 +14,15 @@ verify.codeFix({
|
||||
index: 0,
|
||||
newFileContent:
|
||||
`class A {
|
||||
static m1(arg0: any, arg1: any, arg2: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static foo0() {
|
||||
this.m1(1,2,3);
|
||||
A.m2(1,2);
|
||||
this.prop1 = 10;
|
||||
A.prop2 = "asdf";
|
||||
}
|
||||
static m1(arg0: any, arg1: any, arg2: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}`,
|
||||
});
|
||||
|
||||
@@ -31,18 +31,18 @@ verify.codeFix({
|
||||
index: 0,
|
||||
newFileContent:
|
||||
`class A {
|
||||
static m2(arg0: any, arg1: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static m1(arg0: any, arg1: any, arg2: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static foo0() {
|
||||
this.m1(1,2,3);
|
||||
A.m2(1,2);
|
||||
this.prop1 = 10;
|
||||
A.prop2 = "asdf";
|
||||
}
|
||||
static m2(arg0: any, arg1: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static m1(arg0: any, arg1: any, arg2: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}`,
|
||||
});
|
||||
|
||||
@@ -52,18 +52,18 @@ verify.codeFix({
|
||||
newFileContent:
|
||||
`class A {
|
||||
static prop1: number;
|
||||
static m2(arg0: any, arg1: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static m1(arg0: any, arg1: any, arg2: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static foo0() {
|
||||
this.m1(1,2,3);
|
||||
A.m2(1,2);
|
||||
this.prop1 = 10;
|
||||
A.prop2 = "asdf";
|
||||
}
|
||||
static m2(arg0: any, arg1: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static m1(arg0: any, arg1: any, arg2: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}`,
|
||||
});
|
||||
|
||||
@@ -74,17 +74,17 @@ verify.codeFix({
|
||||
`class A {
|
||||
static prop1: number;
|
||||
static prop2: string;
|
||||
static m2(arg0: any, arg1: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static m1(arg0: any, arg1: any, arg2: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static foo0() {
|
||||
this.m1(1,2,3);
|
||||
A.m2(1,2);
|
||||
this.prop1 = 10;
|
||||
A.prop2 = "asdf";
|
||||
}
|
||||
static m2(arg0: any, arg1: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
static m1(arg0: any, arg1: any, arg2: any): any {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}`,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user